How to fix Failed to load resources error in WordPress

If you have been using the WordPress system for a long time, you may have encountered the Failed to load resources error during your use of it, as many WordPress users from time to time face a problem in loading some resources or files correctly. 

This resource could be a media file, a JavaScript file, a CSS file, etc. Regardless of the type of file that is causing the problem, insufficient resources may cause your website to crash, so if this error continues to appear, it will It reduces the number of visitors to your site, so it is important to fix it. 

 There are a set of simple steps that you can follow to find out why this error occurred and work to fix it on your WordPress site, as we will explain in today’s article.


Reasons for the appearance of the error Failed to load resources

Knowing the causes of the error (Failed to load resources) helps you analyze the error and know the correct way to solve this problem, so before listing the possible solution methods, we will explain the most prominent causes of this error.

Basically, when WordPress creates a page, the source code for that page will contain different files (images, text, CSS codes, etc.). While the page is loading, the user’s browser will download all these files from the server.

But if the browser is unable to download or access a specific file because there is a problem with the server, or because there is a spelling error in the URL of the file, for example, this error will appear to you. Although the browser will attempt to display the page without access to this resource, it will often be able to do so. But sometimes he may fail to display it! 

In any case, the browser will add a warning to its error console in order to correct this error. Thus, through the browser developer tools, you can view the exact error message and know what is written in it, because the error message enables you to know the cause of the problem more accurately.

This error message appears in different forms. Here are some examples of different forms of Failed to load resources error messages:

  • Failed to load resource: net::err_name_not_resolved
  • Failed to load resource: the server responded with a status of 500 (Internal Server Error)
  • Failed to load resource: the server responded with a status of 404 (Not Found)
  • Failed to load resource net::ERR_CONNECTION_REFUSED

Fix the error Failed to load resources

In the following paragraphs, we will mention some possible ways to fix this error. Follow the appropriate step for repair depending on the nature of the error message that appears in your browser. We advise you before taking any step to take a backup copy of your site files .

1- Compensate or replace lost resources

The most common solution is to make sure that the resource or file that failed to load actually exists. For example, if the missing resource is an image on a page or article, try searching your site’s media library and confirm that the image actually exists.

If the image appears in your media library, try editing the page or article and adding it again. If you don’t see the file in your media library, try uploading it again.

Note:  In some cases, broken image icons may appear on the site instead of the actual images. In this case, you may need to fix the problem of corrupted images as explained in the following article .

Likewise, any other files may be deleted from your site for some reason. For example, when a WordPress site is hacked, the site administrator tries to restore it by using a security plugin to scan the files and delete the malicious files from them.

In this case, the site may be restored, but some of the plugin files, templates, or even the basic WordPress files may have been deleted from it, so in such a case you must reinstall WordPress and then upload the template files again. The same applies to plugins, and here you must use FTP to upload new files and replace them with missing files on the server.

2- Change the template used

If the resource that failed to load is a WordPress theme, the easiest way to replace it is to reinstall all of the template files again. For example, if you are using a theme that has been updated for a long time, it is likely that problems and errors will appear due to it when you update to a higher version of WordPress, so You must either update the template, or if there are no updates available, you can activate another template.

For example, alternatively activate the Twenty Twenty template by going to the ( Appearance ) section, then choosing the ( Templates ) tab, then activating the Twenty Twenty template. If the error continues to appear, this means that the problem is not related to the template and you can return to using the previous template on your site.

3- Disable all add-ons and reactivate them

If the missing resource is a plugin file on your WordPress site, you will need to reinstall the plugin by going to the Plugins tab > to view the installed plugins, then select all plugins, choose Disable , and then click the Apply button .

After disabling all the add-ons, you must reactivate them one by one and check whether the problem has disappeared or whether it remains as it is.

Here you can also use FTP to connect to your WordPress hosting account, and manually replace some files if activating them from the control panel does not work. 

4- Fix the URL of your WordPress site

The most common cause of resource failure errors is incorrect WordPress URL settings, so in this case you should fix your site URL to avoid resource failure error.

You also need to make sure that both URLs entered in your site’s control panel are correct. Both options must use the same URL by going to the Settings tab in the Site Control Panel > and selecting General .

Now check that the WordPress address and the site address are correct and the same, as WordPress treats the site address with www as different from the address without www.

Also, if your site uses SSL, you should use the https protocol in the URL instead of http. Finally, click Save and check if the error still appears or if this procedure solved the problem.

5- Disable security add-ons or firewall add-ons from the server

If you are getting the error message Failed to load resources with an error code of 404 like the following:

 “Failed to load resource: the server responded with a status of 400 () /wp-admin/admin-ajax.php”

This means either that the link to the resources you are trying to access has changed, or that there is an add-on on your site that prevents you from accessing the requested file.

In most cases, the reason is the presence of an anti-virus security add-on on your site or a firewall add-on that prevents you from accessing these resources because it suspects that you are trying to hack the site, so you must disable this type of add-on if it exists and check whether the problem disappears after that.

6- Disable security add-ons from the client

Sometimes the problem may be in the browser itself and not in the server or the website. For example, if you have installed add-ons in the browser, such as the Adblockers add-on.

Also, the anti-virus programs in your system may block some contents of websites that lack a sufficient level of security, causing you to see this error. So try disabling these programs and add-ons from your local machine and see if that solves your site issue.

Conclusion

We hope that these previous steps will help you learn how to fix Failed to load resources errors, which is considered one of the most common errors encountered by users of WordPress sites. In this article, we have explained a set of easy steps that you can follow to solve the problem. 

If the problem continues to appear after trying all the previous steps, this means that now is the appropriate time to seek help from an expert, or contact the hosting support team if they provide services to fix such problems.

Avatar photo
I am a young man who has been working in WordPress and e-marketing for 10 years. I would like to share my experience with you so that we can become professional in WordPress I will be happy to share the experience with you.