Fix WordPress Error – The Upload Could Not Be Moved To – cPanel
Sometimes when migrating existing WordPress installs to a new server you may find an error when uploading images to your installation that states “The upload could not be moved to /wp-content/uploads” folder.
This happens because the permissions on the account have not been set correctly. It could also happen in existing installs that have not been migrated to a new server but a recent update has changed the permissions for the cPanel user.
To fix this error you could chmod the directory WordPress is trying to upload your image to, to 777 but this would also bring into question a number of security concerns we do not recommend any users to do.
To fix this error in a secure manner you need root access to the server in question. So resellers cannot perform this fix. Only users with a VPS server or Dedicated server with access to the root account can follow the steps below.
1) Login to your server with the root users account
2) Find the cPanel users username
3) Issue the below command but swap cPanel_user with the username of the account with the image upload problem.
chown -R cPanel_user /home/cPanel_user/public_html
So if the cPanel user reporting this was called first2host the command we would issue would be
chown -R first2host /home/first2host/public_html
Once this has been done you should try to upload your image again and this time the upload should work. This is only to be used on servers where you have access to SSH by using the root account and running cPanel.
How was this article? – Fix WordPress Error – The Upload Could Not Be Moved To – cPanel