Wordpress files and folders permission

Photo by Fikret tozak on Unsplash

Files and Folders Permission for Wordpress

If you have issue on uploading image on Wordpress after migration, most of the cases are due to permission.

So, you can try fixing the permissions of files and folders on your server by running the following commands on your server and it'll set the right permission.

#Give Ownership To www-data  
$ chown -R www-data:www-data /var/www  
# Correct Directory Permissions by cmd searching directories and applied to 755 - owner can read/write/execute, group/others can read/execute.
$ find /var/www -type d -exec chmod 0755 {} \;  
#Correct Files Permissions by cmd searching files and applied to 644 - owner can read/write, group/others can read only.
$ find /var/www -type f -exec chmod 0644 {} \; 

If you would like to apply only on specific folder, you may add excat folder path eg., /var/www/html/yourwebistename.com


Your link is almost ready.

Please wait...