WordPress's "unable to move uploaded files to" error solution: wordpress Solution

Source: Internet
Author: User

WordPress's "unable to move uploaded files to" error solution: wordpress Solution

I uploaded images to my blog on the webpage today. The result is: "The uploaded files cannot be moved to/home/wwwroot/wp-content/uploads/2013, I think it is a permission issue. I changed all my files to 777 permissions, but they still cannot be written and Images cannot be uploaded.
Simply, I checked the permissions of the root directory folder of my website, and the permissions are www and www, while ps aux | grep nginx displays the nginx subroutine running as nobody, ps aux | grep php-fpm, also displays nobody. At the same time, I found that the permissions for other files and folders on my website are root and root. This may be because I copied the file directly as the root user last time. Therefore, the root file cannot be modified as the nobody user.
The method is as follows:
Step 1:
First, the running identities of nginx and php-fpm subprograms are changed to www, and the user group is also changed to www.
Modify the nginx. conf file and Change user nobody to user www;
Run the following command:

Service nginx restart // restart nginx

Modify the php-fpm.conf

  user = nobody  group = nobody

Changed:

  user = www  group =www

Run the command: service php-fpm reload // restart php-fpm
Step 2:
Modify all folders and files to www, www

#chown -R www:www /wwwroot

Upload the image again, prompting you That the upload is successful and the problem is fixed.
There are also some other methods on the Internet, such as changing the image to the English name or the folder to 777. In fact, in many cases, the permission is 777, but it still cannot be uploaded. You can consider whether it is the file owner.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.