{"id":4247,"date":"2021-01-11T23:02:41","date_gmt":"2021-01-11T23:02:41","guid":{"rendered":"https:\/\/chemicloud.com\/kb\/?post_type=ht_kb&#038;p=4247"},"modified":"2024-10-16T09:36:23","modified_gmt":"2024-10-16T09:36:23","slug":"fix-wordpress-image-upload-issues","status":"publish","type":"ht_kb","link":"https:\/\/chemicloud.com\/kb\/article\/fix-wordpress-image-upload-issues\/","title":{"rendered":"How To Fix WordPress Image Upload Issues"},"content":{"rendered":"<p>Have you ever tried to upload an image to your WordPress&#8217; 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.<\/p>\n<p>Not to worry! This tutorial will get you sorted in no time flat!<\/p>\n<h2 id=\"how-to-fix-wordpress-image-upload-issues\">How To Fix WordPress Image Upload Issues<\/h2>\n<p>If you&#8217;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&#8217;re trying to upload. You can fix this quite easily.<\/p>\n<h3 id=\"increasing-the-memory-limit-in-cpanel\">Increasing the Memory Limit in cPanel<\/h3>\n<p><strong>Step 1:<\/strong> Login to your cPanel.<\/p>\n<p>Once your cPanel is open, look for the Files section and open the File Manager.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4086 size-large\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1-1024x380.jpg\" alt=\"\" width=\"1024\" height=\"380\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1-1024x380.jpg 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1-300x111.jpg 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1-768x285.jpg 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1-50x19.jpg 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1-60x22.jpg 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1-100x37.jpg 100w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2020\/12\/filemanager-1.jpg 1424w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Step 2: Scroll down and look for the Software section. Inside this area, click Select PHP Version.<\/p>\n    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Note<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tThe <strong>PHP Selector<\/strong> 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\u2019s cPanel.     \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4248 aligncenter\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion-1024x423.jpg\" alt=\"\" width=\"643\" height=\"266\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion-1024x423.jpg 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion-300x124.jpg 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion-768x318.jpg 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion-50x21.jpg 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion-60x25.jpg 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion-100x41.jpg 100w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/selectphpversion.jpg 1463w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/p>\n<p>Step 3: Once the PHP Selector opens, click the Options tab at the top.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4249 aligncenter\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector-1024x311.jpg\" alt=\"\" width=\"643\" height=\"195\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector-1024x311.jpg 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector-300x91.jpg 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector-768x233.jpg 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector-50x15.jpg 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector-60x18.jpg 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector-100x30.jpg 100w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/phpselector.jpg 1269w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/p>\n<p>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.<\/p>\n<p>Generally, these should be the same, or the post_max_size slightly higher than the upload_max_filesize.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4250 aligncenter\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-1024x319.jpg\" alt=\"\" width=\"643\" height=\"200\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-1024x319.jpg 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-300x93.jpg 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-768x239.jpg 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-50x16.jpg 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-1536x478.jpg 1536w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-60x19.jpg 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1-100x31.jpg 100w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/upload1.jpg 1918w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/p>\n<p>At ChemiCloud, the default for both of these is 100M (Megabytes). Since you&#8217;re likely going to upload more than 100 Megabytes of files at once, you can increase these to 1 Gigabyte.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4251 aligncenter\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-1024x324.jpg\" alt=\"\" width=\"643\" height=\"203\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-1024x324.jpg 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-300x95.jpg 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-768x243.jpg 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-50x16.jpg 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-1536x486.jpg 1536w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-60x19.jpg 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes-100x32.jpg 100w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2021\/01\/updatedsizes.jpg 1918w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/p>\n<p>In the latest version of cPanel, the changes are saved automatically. You don&#8217;t need to look for a Save Changes button.<\/p>\n<p class=\"p1\"><b>Struggling with WordPress troubleshooting? ChemiCloud is the hosting solution designed to save you time and money! <\/b><span class=\"s1\">\ud83e\udd13<\/span><b> Try our <\/b><a href=\"https:\/\/chemicloud.com\/managed-wordpress-hosting?utm_source=kb&amp;utm_medium=article#60b65e4e63b58\"><b>Managed WordPress Hosting<\/b><\/a><b> plans for just $1!<\/b><\/p>\n<p>Now, return to your WordPress site, refresh the Media Library page and try to upload your files again. If you don&#8217;t get an error, you&#8217;ve solved your problem.<\/p>\n<h3 id=\"increasing-the-memory-limit-in-wp-config-php\">Increasing the Memory Limit in wp-config.php<\/h3>\n<p><strong>Step 1:<\/strong> Locate your site\u2019s configuration file (wp-config.php). It\u2019s usually in your site\u2019s root directory, where your WordPress site is installed.<\/p>\n<p><strong>Step 2:<\/strong> Once you have located the wp-config.php file, you must edit it.<\/p>\n<p><strong>Step 3:\u00a0<\/strong>Add the following lines of code at the bottom of your wp-config.php file.<\/p>\n<pre>define( 'WP_MEMORY_LIMIT', '1024M' ); \/\/ increases WP base (front-end) limit\r\ndefine( 'WP_MAX_MEMORY_LIMIT', '1024M'); \/\/ increases WP admin (back-end) limit<\/pre>\n<p>The above lines of code will increase your WordPress front and back-end memory limit to 1024M.<\/p>\n<p>After changing the memory_limit, return to your WordPress site and check if you are getting the same error.<\/p>\n<p>Now, return to your WordPress site, refresh the Media Library page and try to upload your files again. If you don&#8217;t get an error, you&#8217;ve solved your problem.<\/p>\n<p>If the steps above didn\u2019t solve your issue, you might need to restore the website files from a backup if you have one available. If you\u2019re a ChemiCloud customer, you can rest easy!<\/p>\n<p class=\"p1\"><b>Sleep like a baby with ChemiCloud&#8217;s nine different backup options for your sites through JetBackup. <\/b><span class=\"s1\">\ud83d\udecc<\/span> <b>Check out our <\/b><a href=\"https:\/\/chemicloud.com\/wordpress-hosting\/#60b65e4e63b58\" target=\"_blank\" rel=\"noopener\"><span class=\"s2\"><b>WordPress hosting <\/b><\/span><\/a><b>plans!<\/b><\/p>\n<div class=\"hts-messages hts-messages--info \">\n<p>If you enjoyed this tutorial, then you\u2019ll love our support! All ChemiCloud\u2019s hosting plans include 24\/7 support from our amazing support team.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever tried to upload an image to your WordPress&#8217; 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&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"ht-kb-category":[34],"ht-kb-tag":[],"class_list":["post-4247","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-troubleshooting"],"_links":{"self":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/4247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/comments?post=4247"}],"version-history":[{"count":8,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/4247\/revisions"}],"predecessor-version":[{"id":8488,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/4247\/revisions\/8488"}],"wp:attachment":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/media?parent=4247"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=4247"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=4247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}