+2 votes
in Tutorials and Guides by (1.5m points)

How to solve problems with the URL in WordPress

1 Answer

+3 votes
by (725k points)
Best answer

The URL is one of the elements that can give us more headaches in WordPress and if you have come here it is that you have encountered a problem. In this article we will show the process to diagnose and solve problems with the URL in WordPress.


The big problem in dealing with this issue is that when configuring the URL in our WordPress blog, different elements are involved:

  • WordPress database (stores the URL of our blog and other data) .
  • .htaccess file (manages redirection policies of URLS, permalinks, etc.) .
  • HTTP server (manages HTTP requests, etc.) .
  • DNS (manages domain names) .

As we can see, there are three very different elements that act at different levels, so we will have to diagnose problems in all of them. As always, before making any changes to our WordPress blog it is essential to create a backup .

How to solve problems with the URL in WordPress.

In order to follow more detailed instructions, we must first recognize our situation and for this it is essential to review what kind of error the browser returns:

  • Error 404: page not found.
  • Error establishing a connection to the database (Error Establishing a Database Connection) .
  • Error 500: internal server error.
  • Error 403: forbidden.
  • Blank page

Now we will analyze each case to see possible solutions. Being a problem in which so many factors are involved, it is difficult to cover all situations, but at least we will talk about the most common ones.

Blank page when accessing WordPress.

If when you access your WordPress you find a blank page, we already deal extensively with this problem in the article on how to solve the white screen in WordPress .

Error establishing a connection to the database in WordPress.

In this case the origin of the problem is clear, it is the database. It may be that for some reason the MySQL server has stopped and the database is inaccessible.

If the MySQL server service is working correctly, we must check that the database connection data stored in the wp-config.php file is correct (username, password, database name and host name) .

This database error can also be caused by a plugin, so it is worth trying to disable all plugins and see if the problem continues. If after deactivating all the plugins the problem disappears, we will activate one by one to see which one gives us problems.

In my personal experience, cache plugins are generally the ones that cause these types of problems. In the case of W3 Total Cache and WP Super Cache, simply remove them and reinstall them to solve the problem.

I give an example of a problem that recently generated me W3 Total Cache. The case was that I could access normally through the URL http://www.vozidea.com but when I accessed the URL without the three www http://vozidea.com , it showed me database error. The solution was to completely remove W3 Total Cache and reinstall it.

Error 403 "forbidden" when accessing WordPress.

The source of the problem is almost certainly the configuration of the HTTP server, either Apache, Nginx or the server we are using.

We must check the configuration of our HTTP server. When I encountered this error, sometimes the source of the problem was a corrupt .htaccess file or with an incorrect syntax, so just regenerate it by following these steps:

  • Delete the .htaccess file through FTP.
  • Access the WordPress administrator panel. From the Ajustes -> Enlaces Permanentes menu Ajustes -> Enlaces Permanentes , set the URL structure and save the changes.

If this does not work for you, you will have to check that the problem is not generated by a plugin and check the configuration files of your server.

On some occasions I have found that the origin of the problem was the permissions of the WordPress files, since for some servers they must be assigned a specific user and group with specific permissions.

Error 500 "internal server error" when accessing WordPress.

This is the most difficult error to diagnose and everything we have said in the section of error 403 is applicable in this situation . Again the server configuration is almost certainly the cause of this error.

This error can be associated with excessive consumption of RAM by PHP or it may even be that our hosting has some limit of RAM or hard disk usage. Ideally, check with our hosting provider to know these limits and if necessary increase the PHP memory limit.

Error 404 "page not found" when accessing WordPress.

This error indicates that the requested resource is missing, something that can be caused by an incorrect configuration of: the HTTP server, the DNS or the URL.

One of the most common errors that causes this error is a corrupt configuration in the .htaccess file of the permanent links. Many times it is enough to regenerate the .htaccess as indicated in the section of error 403.

Other times the error is caused by a cache or optimization plugin , which incorrectly modifies the .htaccess file. In this case we will have to deactivate the plugins to verify that it is not the source of the problem.

If the problem is related to a URL change , it is best to review the tutorial on how to change the URL of a WordPress blog .

If we have made a change of hosting or server , we might have to check the DNS of our domain and update them with the new DNS provided by the new provider.

There are so many situations that can occur behind these errors, that the best thing I can do is show some general guidelines to diagnose the cause of the error. In many situations, you will save time and money by turning to a professional in WordPress. Do not hesitate to contact us through the contact form if you need our help.

Most popular questions within the last 20 days