Skip to content Skip to main navigation Skip to footer

wordpress搬家后在编辑器无法上传图片或附件问题

Cannot upload to WordPress Media Library (in WordPress Appliance)
我们的博客搬家之后,我们的附件在服务器的绝对地址可能会产生变化。您会发现在我们想在新的服务器上传图片的时候,会产生类似这样子的问题:
无法建立目录 /home1/hugege/public_html/wp-content/uploads/2009/09。
“test.jpg” has failed to upload due to an error
The uploaded file could not be moved to /var/www/wordpress/wp-content/uploads/2013/05.
是否上级目录没有写权限?
解决问题的办法是运行下面的命令:
chown -R www-data:www-data /var/www/wordpress/wp-content/uploads
chmod -R 755 /var/www/wordpress/wp-content/uploads
这个主要针对debian,ubuntu 主机, 因为ubuntu系统中的apache 用户默认是www-data…所以必须这么改。。。。

0 Comments

There are no comments yet

Leave a comment

Your email address will not be published.