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 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.

Generally, these should 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 you’re likely 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.

Are you tired of slow WordPress hosting? We use LiteSpeed caching to deliver content to your visitors almost instantly.  Check out our WordPress Hosting plans!

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, 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 must 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 your WordPress front and back-end memory limit 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, 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!

Sleep like a baby with ChemiCloud’s nine different backup options for your sites through JetBackup. 🛌 Check out our WordPress hosting plans!

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.

Updated on April 5, 2022

Was this article helpful?

Related Articles

TRY CHEMICLOUD RISK-FREE
Fast, secure cloud hosting. 18 global data centers. Unhappy with your web host?
👉 Migrate for Free

Leave a Comment

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