Stuck with the error, Failed to load resource in WordPress? We can help you.
Most of us find it difficult to figure out which resource or file does not load in WordPress. We fail to understand why is it not loading correctly.
As part of our Server Management Services, we assist our customers with several WordPress queries.
Today, we will see how to easily troubleshoot and fix the “Failed to Load Resource” error in WordPress.
Failed to load resource in WordPress
WordPress includes several files when loading any page on a website. These files then load by the user’s browser.
Generally, if the browser is unable to load a specific file, then it will display the page without that file. In such a case, we will see the “Failed to resource” error in the browser’s Inspect tool.
Below are few examples:
- Failed to load resource net::ERR_CONNECTION_REFUSED
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- Failed to load resource: net::err_name_not_resolved
Though a specific file does not load, the rest of our web page will continue to load.
However, it may not look or behave as we expect.
How to solve this error?
Moving ahead, let us see the solutions our Support Techs employ.
Replace The Missing Resource
Initially, we ensure that the failed resource actually exists.
Consider the missing resource as an image in a blog post or page, then we try to look for it in the media library.
If we find it in the media library, we try to add it back by editing. However, if we fail to find the file in the media library, then we try to upload it again.
In some cases, we may see broken images or empty boxes. In that case, we need to fix the file permissions.
Replace theme or plugin files
On the other hand, if the missing resource is a WordPress plugin or theme file, we can replace it with a reinstall of the same.
Initially, we need to deactivate our current WordPress theme. In order to do that, go to the Appearance » Themes page.
In case we have another theme installed on our website, we can go ahead and activate it. This will deactivate the existing theme.
If we don’t have another theme installed, we can install a default theme.
Once done, we can visit our website to see the resolution.
In the case of a WordPress plugin file, we need to reinstall the plugin.
We can also use FTP to connect to WordPress hosting account and manually replace a specific file.
Fix WordPress URL to Avoid Failed Resource Error
Incorrect WordPress URL settings are the most common cause of this error.
In order to fix this, we head over to the Settings » General page and look for WordPress Address and Site Address options.
We ensure that both URLs are correct. Both options should have the same URLs.
Keep in mind that if we have SSL enabled on the website, then the URLs should begin with HTTPS instead of HTTP.
Eventually, Save the changes to store the settings.
[Found it helpful? Here’s a lot more]
In short, the major cause of the error, Failed to load resource in WordPress is incorrect WordPress URL settings. Today, we saw how our Support Techs fix it easily.