Home > Article > CMS Tutorial > How to modify wordpress php file permission settings
WordPress permissions have a great impact on installation and usage. If your server uses a Linux system, you can use the cd command to go to the file or folder where you need to modify the permissions. directory, and then use the chmod command to modify file permissions.
If you want to know more about wordpress, you can click: wordpress tutorial
The following is an introduction to you Solutions to several problems caused by file permissions.
1. Cannot install theme or modify theme or delete theme
chmod 755 wordpress find wordpress -type d -exec chmod 755 {} \; find wordpress -iname “*.php” -exec chmod 644 {} \; chown -R nginx:nginx wordpress
2. When your wordpress encounters When the following problems occur:
1. Unable to upload pictures
2. Unable to automatically install themes and plug-ins (requires FTP account)
3. Unable to update automatically
4. Any other problems that require wordpress to write files
These problems are basically It's all for the same reason. Your WordPress directory does not belong to the current user and group, that is, users with web access do not have permission to operate all wp operations that require write permissions. Solution:
First, you need to have root permissions, log in with SSH, and enter the wp installation directory:
cd /var/www/html/my_wp_blog
Give all write permissions:
chmod 777 wp-content
Next, give it to you When you upload a picture to a blog post, WP will generate a directory and then check which user created the folder. Under normal circumstances, this user's name is "apache", and many people find that this user is "nobody". Regarding the problems encountered by Piaoyi itself, I installed LNmp on the VPS, and this user is "www".
Enter the wp-content directory of wp and check the permissions of all files/folders in the directory. The users and user groups they belong to:
cd wp-content ls -l
total 16 -rw-r–r– 1 root root 30 May 4 2007 index.php drwxr-xr-x 3 root root 4096 Feb 10 19:31 plugins drwxr-xr-x 5 root root 4096 Mar 23 03:04 themes drwxrwxrwx 3 www www 4096 Mar 24 02:08 uploads
Note that the upload directory uploads is created by the user www.
Next, restore the wp-content permissions to 755::
cd .. chmod 755 wp-content
Next is the actual repair command, change the owner of the folder where wp is located to the user just found www:
cd .. chown -R www:www my_wp_blog
The above is the detailed content of How to modify wordpress php file permission settings. For more information, please follow other related articles on the PHP Chinese website!