Are you receiving the “Failed to load resource” error in WordPress each time you enter your website’s interface or attempt using the browser’s inspect tool to scan your website? This error can be frustrating but that doesn’t mean it can’t be fixed.
The various cause of the “failed to load resource” error, some of the main causes may be plugin/themes compatibility issues or errors in the site’s HTTPS URL. It could affect files like images, JavaScript, CSS stylesheet, or any other media on the server, which could affect the functionality of your website.
In this article, I will be discussing how to fix the “failed to load resource” error in WordPress.
What are the causes of the “Failed to load resource” error in WordPress?
When you try loading a particular file on your WordPress website but WordPress is unable to load or generate the file, this could trigger the “failed to load resource” error in WordPress.
Whenever WordPress loads up a page on a website, it usually includes several files and folders, like images, stylesheets, and scripts. As the page is loading, these files and folders also load through the user’s browser.
However, if during this process the browser starts having issues loading the files, this will result in the page being displayed by the browser without the files, and will trigger the “failed to load resource” error.
The browser will also add a notice indicating the issue in its error console to help in fixing or debugging the error.
Depending on if the resource file that is unable to load is an image, CSS stylesheet, or
Depending on if an image, CSS stylesheet, or JavaScript is the resource file that is unable to load, the error comes with a different message next to it which can be helpful in identifying where the error is from.
Below are some examples of “failed to load resource” errors:
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: net::err_name_not_resolved
- Failed to load resource: net::ERR_CONNECTION_REFUSED
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Although this error may only affect a single page on your website, while other pages on the site may continue working just fine. It can have an adverse effect on your website’s SEO and performance, frustrating users of your website, and lead to your site losing traffic. That’s why you have to fix the “failed to load resource” error immediately after you notice it.
Next, I will be guiding you through steps on how to fix the “failed to load resource” error in WordPress.
How to Fix “Failed To Load Resource” Error in WordPress
Replace The Missing resource
Before you make any changes to a particular page file, ensure that the “failed to load resource” error message is coming from that particular page or that it exists.
If the error message is coming from a missing resource such as an image uploaded on the page, you will have to head to your Media Library to check if the file is there.
If the image file is in the Media Library, edit the page or post and try adding the image again. If you can’t find the file in the media library, it’s probably because the file is deleted. Try uploading the image file again.
Once you have replaced the old file with a new one, this should solve the “failed to load resource” error. If you are still seeing broken images or empty boxes, then you should fix the file permission to allow WordPress to load the image.
Replacing the theme or plugin files
If the failed to load resources error is caused by your theme or a plugin installed on your WordPress website, you should remove the faulty theme or plugin and replace it.
If the fault is from your current WordPress theme, you should deactivate it and replace it with the default WordPress theme. Simply go to your WordPress admin dashboard, click on Appearance, and select Themes.
There you can deactivate the theme and install another theme for your WordPress website. Once you are done with the installation, you can activate it to replace the previous theme.
If the failed resource is from your plugins, you will have to deactivate all your installed plugins to figure out which one is behind the error message.
Simply go to your WordPress admin dashboard, click on Plugins and select Installed plugins. These will take you to a list of all the installed plugins on your WordPress website.
Mark all of them, select Bulk Action, and click on Deactivate. Once you are done with the deactivation, go back to the web page with the failed to load resource error, and check if the error has been fixed.
Then activate the plugins one by one, after each activation goes back to the web page to check if the error is back. This is where you will figure out which of the plugin was responsible for the error.
When you find the plugin, delete and replace the plugin.
Edit the Default WordPress URL
Another common cause of the “failed to load resource” error is if there is an issue with the settings of the WordPress URL. To fix this issue, you will have to head down to your WordPress settings and perform the necessary configurations there.
Go to your WordPress admin dashboard, select Settings, and click on General. These will take you to a page where you will find the WordPress Address and Site Address options.
Go through both address options and ensure the URLs in both are correct. Take note that “www” and “non-www” URLs are treated by WordPress as two different addresses, so check to ensure that this isn’t the case by ensuring both have the same prefix. If SSL is enabled for your website, check and ensure that your URLs start with HTTPS instead of HTTP.
When you are done with the editing, click “Save changes” to store all the settings you have done.
Now go back to your website and check if the “failed to load resource” error has been fixed.
If you are still having issues solving the issue, I will recommend that you contact a WordPress expert or your web hosting technical support team for assistance.