• I’m setting up a WordPress website for a friend and keep getting an error message when I try and install plugins and themes via the WP dashboard. At first I got the message ‘the uploaded file could not be moved to’ … the url of the uploads folder. So I deleted the uploads folder, created another one and set the permission to 777. Now when I try and upload a plugin or theme I’m prompted to enter the FTP login data, and when I enter the correct ftp login data, it doesn’t recognise it.

    I can upload images to the new uploads folder, but I still can’t install themes and plugins via the dashboard. I would be quite happy to work around this by using ftp, but my friend who will be maintaining the website, isn’t familiar with ftp.

    I’ve googled the problem and tried various suggested fixes, including changing permissions and editing the .htaccess file, but nothing works. At the moment, permissions on the wp-content, themes and plugin directories are set to 755 (I’ve tried increasing permissions) and the uploads folder is set to 777. I tried a tip I found which recommended adding this to .htaccess – ‘SecFilterEngine Off SecFilterScanPOST Off’ but this just caused a server error. I’ve also contacted the hosting support, and they don’t seem to have an answer either. It’s a LAMP setup. I would be very grateful if someone could come up with a suggestion as I’ve wasted hours of time trying to solve this.

Viewing 10 replies - 1 through 10 (of 10 total)
  • I am having the same problem… There are tons of forums n other sites about this issue but no one has the answer… I have changed permissions to 777, 775, 666… I have screwed with .htaccess. Can’t get it to work. Glad to know I’m not the only one! Running PLESK if that helps. Folder showing user Apache – anything to do with it?

    Thread Starter lizmint

    (@lizmint)

    Yes I’m running PLESK too, and the uploads folder was showing user Apache until I deleted it and created it again. Still didn’t work though.

    Thread Starter lizmint

    (@lizmint)

    Maybe it’s something to do with Plesk then. I found this article which suggests turning off Safe Mode. Anyone have an opinion on this?

    Thread Starter lizmint

    (@lizmint)

    Doesn’t work though ??

    Hey, did either of you find a solution to this?

    Thread Starter lizmint

    (@lizmint)

    No, I’ve given up on it – too much time and trouble spent already, I’ll just use ftp – (unless you have a quick and easy suggestion!!)

    I was setting up a blog for friend and I ran into this. I hadn’t seen the solution that ended up working for me so I thought I’d post it.

    There’s quite a bit on permissions on these threads and other blogs, as well as on php’s safe mode. Both those things can cause this error, so the only thing I’ll say is that you should never set chmod 777 on anything in your web folders. If 755 or 775 isn’t working for you, then either the group or user on the folder(s) is set incorrectly.

    The other thing I found that can cause this error, and what was causing it for me, was PHP’s file upload settings. I think this is specific to using a setup with a webserver in front of PHP FCGI (as opposed to using mod_php, but I haven’t tested with mod_php), in which the webserver might be accepting the file size, but PHP hasn’t been setup in a similar fashion. So the webserver hands the file upload to PHP and PHP refuses it cause it’s too big. This throws an error back to the webserver which WordPress is interpreting as not having permission, even though the user/group permissions on the folder are correct.

    To fix, update php.ini:

    upload_max_filesize=50M
    post_max_size=50M

    That’s 50 megabytes. You might want to use another size, but that should cover most image and wordpress theme uploads.

    More info here:

    https://www.radinks.com/upload/config.php

    Thank you @ejesse!

    After trying every other suggestion, I found yours, which worked for me.

    I added the two lines you suggested to my php.ini, restarted Apache, and now theme installs work as they should.

    Thanks again!

    If you can’t turn PHP safe mode off for your site there are some thoughts here on how you might get around that. It’s host specific but you should be able to apply the concept to different servers.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘The Uploaded File Could Not Be Moved To …’ is closed to new replies.