Avatar ·

Correct file permissions for WordPress on PHP

Hello everyone! I'm a beginner in PHP and WordPress, and I've run into a serious problem with file permissions on the server. I deployed my first WordPress site, but after a week I encountered errors: I can't update plugins, themes, and sometimes the site just shows a white screen. The hosting provider said the problem is with incorrect chmod permissions. Currently I have everything set to 777 because I wanted it to work, but that's not secure, right? I read that folders should be 755 and files should be 644, but after doing that some features stopped working, like uploading images through the admin panel. Here's an example of code from my wp-config.php where I temporarily commented out some settings: ```php define('WP_DEBUG', true); // define('WP_DEBUG_LOG', true); // define('WP_DEBUG_DISPLAY', false); ```