One of the most common problems in WordPress (as any other platform) is to get error messages when trying to upload images. This is a big challenge for starters who can’t find a quick solution. So, I’ll show why you can’t upload images in WordPress, and how to solve these problems easily and directly from your cPanel without the need to use complicated ways.
This problem is similar to other issues such as the white screen of death, and it can be solved easily in a few steps, just follow them.
Fixing WordPress problems when uploading images
There are many causes, but, I’ll talk about all the similar problems in one case to make things easy to solve.
The uploaded file could not be moved to wp-content/uploads
This is the first error problem that appears on the WordPress image Uploader. I’ll show you how to fix it, but first, why this error?
WordPress Uploader can work perfectly when your server allows modifying the ”upload” directory. But sometimes, web hosting companies can have issues with that, especially, those with Softaculous auto-installer. In the meantime, you can get this problem when migrating from servers and web-hosting companies, your new host can find issues with the Uploader file permissions in WordPress.
Luckily, this issue can be solved in simple steps. All you have to do is to edit the ”upload” file permission to ”777”. It’s better to make it ”555”. But, it will never work with servers with Softaculous, or it works, but, with issues.
Of course, you should change the settings back to their original value, that’s important for security. So, let’s change it together.
If you don’t have cPanel, you have to apply the following tutorial, it’s a simple FTP software that will connect to your server, and let you manage all files.
Login to your cPanel account, then, locate ”File manager”. You will get a pop-up window to select the website that you want to use.
Then, you get the site files, find the ”wp-content” directory as the below screenshot.
Next, open the ”Uploads” directory as the following example.
The “uploads” directory is organized by years and months. So, you’ll find something like 2015 (years) as the parent folder. Forget everything about this file permission, even, if you find it ”777 ”it won’t work. That file needs permission for every file inside it.
We need to change the permission for months. Thus, your WordPress ”Uploader” gets access to this file without the need to ask for permissions every time. So, open the year’s file “2015” for now, and you get the months inside.
Click on each month, and a new window at the top left corner of the page will open. Or simply, you will be able to edit the file on the same page if you use the ”File Manager”. You need to click on ”change permissions”.
Now, all you have to do is to set the permissions ”777” (read, write, execute) for every single month inside the uploaded images, then click ”change”.
Come back to WordPress, refresh the page, and you can upload your images naturally without problems. You can also change the permissions back to ”755”, but, it’s not guaranteed that the WordPress Uploader continues working.
Uploaded images disappeared in WordPress posts
This is another common issue with WordPress Uploader, but, it’s easier to solve than the above problem. All you have to do is to define the file that will host your images. So, when you want to upload images, select ”Media File” File, and ”Full Size”. That’s for the first time when changing hosts or re-install WordPress.
Thus, WordPress Uploader can save your images in the right folder, and recognize them correctly.
Please make sure to delete your browser cache if you still get an error. It happens that the browser version or settings show the error, and even, switch your browser to verify the problem source.
This is a situation where you upload the image, it takes a long time to wait, and then, you get an error message that says:
“An error occurred in the upload. Please try again later”
In general, it’s a problem with the hosting provider that limits the PHP execution time to 30 seconds, or something similar. The solution is simply to close the pop-up window and refresh the page by clicking the “save draft”, or “update” button.
Then, you will find the uploaded image in your media library, and you just need to insert it in the post. The main idea here is that the image will be uploaded first, but the Uploader can’t see it.
You need to refresh the page as I said, you need to do that, for every image if your web hosting company wouldn’t change the PHP execution time limit.
If you want to upload images to WordPress and the problem persists, then, you should change your webs hosting provider. Your site will be loaded in less than one second, especially, when you have optimized images and a clean theme, without lots of banner ads anywhere.
Low-quality servers can’t help you in all cases and they will destroy your hard work. You have your own decision to continue with your actual hosting that causes problems, or, to upgrade to the best fully optimized hosting for speed and performance.
These are the common problems with WordPress Uploader. They happen when you change the server, and migrate your site to another hosting. If you have another issue and you want to share their solutions, or simply, want to ask how to solve them. You can explain all in your comment. So readers can learn from each other, and solve their problems when uploading images to WordPress websites.