1. Home
  2. Hosting Management
  3. Troubleshooting
  4. How To Fix WordPress Image Upload Issues

How To Fix WordPress Image Upload Issues

Have you ever tried to upload an image to your WordPress’ media library and experienced problems? Quite possibly! For many people, image upload errors can be quite confusing because they can appear seemingly out of nowhere.

Not to worry! This tutorial will get you sorted in no time flat!

How To Fix WordPress Image Upload Issues

If you’re uploading larger files, you may encounter an error because your Maximum File Upload Size is lower than the total size of the files you’re trying to upload. You can fix this quite easily.

Increasing the Memory Limit in cPanel

Step 1: Login to your cPanel.

Once your cPanel is open, look for the Files section and open the File Manager.

Step 2: Scroll down and look for the Software section. Inside of this area, click Select PHP Version.

Note

The PHP Selector is not included by default in cPanel and might be missing from your account if you are hosting with a different web host. All ChemiCloud customers should see the Select PHP Version section in their hosting account’s cPanel.

Step 3: Once the PHP Selector opens, click the Options tab at the top.

Step 4: On the Options page, scroll down and look for two options. The first is called post_max_size and the second is upload_max_filesize.

It’s generally recommended to have these be the same, or the post_max_size slightly higher than the upload_max_filesize.

At ChemiCloud, the default for both of these is 100M (Megabytes). Since it’s likely you’re going to upload more than 100 Megabytes of files at once, you can increase these to 1 Gigabyte.

In the latest version of cPanel, the changes are saved automatically. You don’t need to look for a Save Changes button.

Now, return to your WordPress site, refresh the Media Library page and try to upload your files again. If you don’t get an error, then you’ve solved your problem.

Increasing the Memory Limit in wp-config.php

Step 1: Locate your site’s configuration file (wp-config.php). It’s usually in your site’s root directory, where your WordPress site is installed.

Step 2: Once you have located the wp-config.php file, you will have to edit it.

Step 3: Add the following lines of code at the bottom of your wp-config.php file.

define( 'WP_MEMORY_LIMIT', '1024M' ); // increases WP base (front-end) limit
define( 'WP_MAX_MEMORY_LIMIT', '1024M'); // increases WP admin (back-end) limit

The above lines of code will increase the memory limit of your WordPress front and back-end to 1024M.

After changing the memory_limit, return to your WordPress site and check if you are getting the same error.

Now, return to your WordPress site, refresh the Media Library page and try to upload your files again. If you don’t get an error, then you’ve solved your problem.

If the steps above didn’t solve your issue, you might need to restore the website files from a backup if you have one available. If you’re a ChemiCloud customer, you can rest easy! All our WordPress hosting plans come with 30 day daily offsite backups allowing to be quickly restored.

If you enjoyed this tutorial, then you’ll love our support! All ChemiCloud’s hosting plans include 24/7 support from our amazing support team. Check out our WordPress hosting plans and have your website migrated today!

Updated on January 12, 2021

Was this article helpful?

Related Articles

Need help?
We're always here for you. Submit a ticket or Chat with a live person.
Submit Ticket

Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.