Are you trying to fix the file and folder permissions error in WordPress? Incorrect file and folder permissions can cause several errors on your WordPress site during uploading media’s or when installing or updating plugins. In this article, we will show you how to quickly fix file and folder permissions error in WordPress.
Did you know your self-hosted WordPress site lives on a computer run by your WordPress hosting company? This computer acts as a web server and uses a special software (usually Apache or Nginx) to manage your files and serve them to browsers.
This server is pre-configured with some files and folder permissions that tell the server who can read, run, or modify files hosted on your account for security purposes. Likewise, wordPress also needs permissions to manage files and create folders on the server. Incorrect file permissions can block WordPress from creating folders, upload images, or run some scripts.
In most cases, WordPress will try to warn you that it can’t edit a file, create a folder, or cannot write to disk. However, sometimes you may not see any proper error messages.
Trending How To’s:
Correct File and Folder Permissions in WordPress
Below i have provided correct permissions for wordpress for smoother running. You need to have SSH access to try this method.
Click here if you don’t know how to SSH to your server
Once you have SSH access to your server/website type the following 3 commands respectively.
Run these commands, and your wordpress website will work just fine (both dashboard and ftp).
sudo usermod -aG www-data $USER sudo chown -R www-data:www-data /var/www sudo chmod -R 774 /var/www