{"id":9066,"date":"2018-05-08T09:07:38","date_gmt":"2018-05-08T09:07:38","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=9066"},"modified":"2026-03-10T10:07:41","modified_gmt":"2026-03-10T10:07:41","slug":"fix-wordpress-add-media-button-not-working","status":"publish","type":"post","link":"\/my\/tutorials\/fix-wordpress-add-media-button-not-working\/","title":{"rendered":"WordPress Add Media button not working: How to fix it quickly"},"content":{"rendered":"<p>We know the frustration. You are busy preparing a post to publish, so you decide to add some media, but the WordPress<strong> Add Media&nbsp;<\/strong>button in the classic editor doesn&rsquo;t work. This problem can be frustrating because you don&rsquo;t know what is wrong, and your workflow bears the brunt of it all. <\/p><p>In this tutorial, we&rsquo;ll show you exactly how to fix&nbsp;<strong>Add Media&nbsp;<\/strong>button not working. Let&rsquo;s dive right in to solve this issue and get you back to publishing your post.<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Mega-WordPress-Cheat-EN.pdf\" target=\"_blank\" rel=\"noopener\">Download all in one WordPress cheat sheet<\/a><\/p><h2 class=\"wp-block-heading\" id=\"h-cause-of-the-add-media-button-not-working\">Cause of the Add Media button not working<\/h2><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69d3556f44446\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"590\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2018\/05\/wordpress-add-media-button-1024x590.png\" alt=\"The Add Media button in WordPress classic editor\" class=\"wp-image-122192\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-add-media-button-1024x590.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-add-media-button-300x173.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-add-media-button-150x86.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-add-media-button-768x443.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-add-media-button.png 1334w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>The most common reason the <strong>Add Media<\/strong> button doesn&rsquo;t work is script conflicts in WordPress themes or plugins. JavaScript powers many WordPress admin features, including the <strong>Add Media<\/strong> button. When its script conflicts with another, the button stops working.<\/p><p>Now, let&rsquo;s troubleshoot and fix the&nbsp;<strong>Add Media&nbsp;<\/strong>button not working in WordPress.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-fix-wordpress-add-media-button-not-working\">How to fix WordPress Add Media Button not working<\/h2><p>Using the <a href=\"\/my\/tutorials\/how-to-use-hostinger-file-manager\/\">File Manager<\/a> or an FTP client, access the root directory of WordPress and edit the&nbsp;<strong>wp-config.php&nbsp;<\/strong>file.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69d3556f46026\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"490\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2018\/05\/file-manager-wp-config-file-edit-1024x490.png\" alt=\"The wp-config.php file in File Manager with the Edit button highlighted\" class=\"wp-image-122193\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/file-manager-wp-config-file-edit-1024x490.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/file-manager-wp-config-file-edit-300x144.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/file-manager-wp-config-file-edit-150x72.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/file-manager-wp-config-file-edit-768x367.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/file-manager-wp-config-file-edit-1536x735.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/file-manager-wp-config-file-edit.png 1919w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Next, add the following code just before the line that says, &ldquo;That&rsquo;s all, stop editing! Happy blogging.&rdquo;<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">define('CONCATENATE_SCRIPTS', false);<\/pre><p>Save the changes to your&nbsp;<strong>wp-config.php&nbsp;<\/strong>file. <\/p><p>Then, log out of your WordPress site. We also recommend <a href=\"\/my\/tutorials\/how-to-clear-wordpress-cache\">clearing your WordPress cache<\/a>.<\/p><p>Finally, log back into your WordPress admin and check if the&nbsp;<strong>Add Media&nbsp;<\/strong>button is working.<\/p><p>The above code simply tells WordPress to&nbsp;load each script individually instead of combining the requests, which is what WordPress does by default. This minimizes the chances of running into conflicts.<\/p><p>While this code is your best chance of fixing the&nbsp;<strong>Add Media&nbsp;<\/strong>button, it is not a permanent solution since the problem indicates you have conflicting scripts on your site, something you obviously want to fix.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/my\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner-1024x300.png\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-1024x300.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-300x88.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-150x44.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-768x225.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner-1536x450.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/06\/New-WP_in-text-banner.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-troubleshooting-the-cause-of-wordpress-add-media-button-not-working\">Troubleshooting the cause of WordPress Add Media Button not working<\/h2><p>Now, let us find the root of the script conflict so you can eliminate the problem once and for all. We recommend doing this on a <a href=\"\/my\/tutorials\/wordpress-staging-environment\">WordPress staging environment<\/a> first instead of the live one.<\/p><p>You can pinpoint the cause by right-clicking on the classic editor and going to <strong>Inspect &rarr; Console<\/strong> using your browser. The console tool highlights script errors that can help you identify the problem.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"\/my\/tutorials\/wp-content\/uploads\/sites\/2\/2018\/05\/chrome-inspect-console.jpg\"><img decoding=\"async\" width=\"900\" height=\"582\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2018\/05\/chrome-inspect-console.jpg\" alt=\"Chrome Console\" class=\"wp-image-9124\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/chrome-inspect-console.jpg 900w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/chrome-inspect-console-150x97.jpg 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/chrome-inspect-console-300x194.jpg 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/chrome-inspect-console-768x497.jpg 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/a><\/figure><\/div><p>That aside, start by deactivating all of your plugins. Then, check if the&nbsp;Add Media&nbsp;button is working. If it is, then it is obvious that one of your plugins is causing the script conflict.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69d3556f4a41a\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"443\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2018\/05\/wordpress-plugin-bulk-deactivate-1024x443.png\" alt=\"Bulk deactivate WordPress plugins\" class=\"wp-image-122194\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-plugin-bulk-deactivate-1024x443.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-plugin-bulk-deactivate-300x130.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-plugin-bulk-deactivate-150x65.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-plugin-bulk-deactivate-768x332.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-plugin-bulk-deactivate-1536x665.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2018\/05\/wordpress-plugin-bulk-deactivate.png 1740w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Next, reactivate the plugins individually and check the&nbsp;Add Media&nbsp;button after each activation. When you find the plugin that is responsible, contact the developer for help or find a replacement.<\/p><p>If the problem persists after deactivating all plugins, you need to ensure you&rsquo;ve cleared your caches first and then test if your theme is the cause of the WordPress&nbsp;<strong>Add Media&nbsp;<\/strong>button not working.<\/p><p>Just activate a default WordPress theme and then check if the problem is gone. If the button works, the issue here is your theme. Contact the theme architect for support or change to another theme. If you know your way around code, you can even eliminate the conflict by editing your theme&rsquo;s files.<\/p><p>When you find the cause of the problem on your staging site, you can go ahead and implement the fix on your live WordPress site.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Usually, the&nbsp;<strong>Add Media&nbsp;<\/strong>button breaks due to script conflict somewhere on your website. The line of code added to&nbsp;<strong>wp-config.php<\/strong> we shared earlier should work as a quick fix.<\/p><p>We highly recommend <a href=\"\/my\/tutorials\/how-to-update-wordpress\">updating your WordPress site<\/a> so that you can get rid of old code and scripts that might cause conflicts.<\/p><p>Additionally, remember that your cache might mislead you into thinking you have a problem, so it&rsquo;s vital to clear your cache before and after trying our suggested solutions.<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Learn how to solve other WordPress errors<\/h4>\n                    <p><a href=\"\/my\/tutorials\/debug-wordpress\">How to Use Debug WordPress Function<\/a><br>\n<a href=\"\/my\/tutorials\/wordpress-error-establishing-database-connection\">How to fix database connection errors on WordPress<\/a><br>\n<a href=\"\/my\/tutorials\/how-to-fix-500-internal-server-error-in-wordpress\">How to solve Internal Server Error (500) on WordPress<\/a><br>\n<a href=\"\/my\/tutorials\/fix-the-uploaded-file-exceeds-the-upload-max-filesize-directive-in-php-ini-wordpress\">How to fix upload_max_filesize errors in WordPress<\/a><br>\n<a href=\"\/my\/tutorials\/how-to-fix-maximum-execution-time-exceeded-error-wordpress\">How to solve max_execution_time Exceeded error<\/a><br>\n<a href=\"\/my\/tutorials\/how-to-fix-wordpress-syntax-error\">How to fix \"Parse Error: Syntax Error, Unexpected\" in WordPress<\/a><br>\n<a href=\"\/my\/tutorials\/wordpress-broken-permalinks\">How to fix broken permalinks in WordPress<\/a><\/p>\n                <\/div>\n\n\n\n<\/p><p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We know the frustration. You are busy preparing a post to publish, so you decide to add some media, but the WordPress Add Media&nbsp;button in the classic editor doesn&rsquo;t work. This problem can be frustrating because you don&rsquo;t know what is wrong, and your workflow bears the brunt of it all. In this tutorial, we&rsquo;ll [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/my\/tutorials\/fix-wordpress-add-media-button-not-working\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":81,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Fix WordPress Add Media Button Not Working","rank_math_description":"Learn how to fix WordPress add media button not working error without breaking a sweat. Troubleshoot and solve the problem once and for all.","rank_math_focus_keyword":"wordpress add media button not working","footnotes":""},"categories":[1],"tags":[],"class_list":["post-9066","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"hreflangs":[],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/9066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/comments?post=9066"}],"version-history":[{"count":28,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/9066\/revisions"}],"predecessor-version":[{"id":122195,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/9066\/revisions\/122195"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/media?parent=9066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/categories?post=9066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/tags?post=9066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}