Skip to content

How to find the .htaccess file on our WordPress site

Although we should not all consider ourselves great experts in the management of each of the corners of our site that contemplates WordPress, but it is always necessary to try to have general knowledge about one situation or another in the event that we need to solve some kind of urgent cases.

There is a large amount of information placed on the Internet that mentions a file named .htaccess, which should be handled with some care but, its presence may be relative depending on the administration done in WordPress. We wanted to take this issue in this article because there are a lot of questions in different forums on the Internet, where they usually try to find a solution to a problem raised in the WordPress blog, coming immediately the suggestion by experts who mention the deletion of this .htaccess file.

Where do we find it inside our WordPress site?

The .htaccess file will be found at the root of our WordPress-based website, which for many people comes to be something completely different from conventional, since at no time has perhaps been found with a file that has such a peculiar feature:

  • The file is separated by a dot followed by an extension.
  • It does not have a defined name before the period.
  • The extension after the dot has more than 3 characters.

It is valid to have made this small description of the file, as it will avoid any confusion when interpreting it; now, if this file has been mentioned as important as the responsible for some kind of failure on our website, then it would be necessary to define its exact location to later have to remove it; it is there where many people have come to find the problem, since the file does not appear anywhere, something that could be arising due to its absence or simply, it belongs to those files hidden from the system (in this case, the platform).

The .htaccess file will not be found in any of the corners if we browse the WordPress blog, but rather, it is necessary to go to some client that takes us to the same environment of the server where the site is hosted. This will mean having to use a specific software, being a good recommendation FileZilla, which has an interface completely easy to recognize and use and is also completely free because it belongs to the open source category.

Finding the .htaccess file with FileZilla

FileZilla is an excellent open source software that we could be using for different functions, something that we have already mentioned in some posts but mainly to try to manage our templates or the different plugins that we have installed in the WordPress blog.

Right now we will try to find other alternatives with this open source application, being one of them, to try to find the .htaccess file, which could be absent, present or hidden, situations that will depend a lot on the type of activity we have carried out in our blog.

Well, if you have already obtained this FileZilla software we recommend you to follow the following steps so that you can find the .htaccess file in a very easy and simple way:

  • Execute FileZilla software.
  • We enter these credentials (server, username and password).
  • Click on Quick Connect.

Once we have logged in to our WordPress blog server we go to the root of the blog.

With these simple steps we should already be visualizing this .htaccess file, although the experience of a large number of users has been somewhat negative, ie, having followed this procedure have not yet found this element. That can happen because it is considered as a system file in WordPress, which is why it can be hidden or invisible. To be able to make it visible, we only have to force its visualization from the Server option, something that you can admire in the image that we will place next.

If the file is present or exists, it will appear in the root of the server where our WordPress blog is hosted. Once we have it in sight we can manipulate it according to what has been suggested by experts in the management of servers and platforms. It is very easy to have to delete this file from here, although it would be advisable to have to move it to some location on our local hard drive, this in the event that something should fail and therefore, we need to copy it back to the original position of where we deleted it previously.

Create a .htaccess file in our WordPress blog

However, the presence or absence of this .htaccess file depends mainly on the type of activity that has been carried out in the blog; there are some occasions in which none of the preferences or configurations of the blog have been moved, which is why this file may not exist. If we need it, the ideal thing is to try to create a text file with our simple notepad, being able to write there any type of instruction that has been indicated to us in some of the tutorials that exist in Internet to improve the operation of our Web site.

Once it has been generated in this way, we must be careful how we save it (save), since the extension should be .htaccess and without a name in front of the dot.

If this task seems a bit complicated to you, then you could opt for a simpler and simpler procedure. In a previous article we had analyzed how to work with the “Permanent Links”, something that we should return to at this point to better explain what we mean.

If we go to the area where these “Permanent Links” are located, we could choose some kind of format different from the predetermined one and then save the changes. With this simple operation our .htaccess file will be automatically created in the root of the server where the WordPress blog is located, being able to proceed to locate it as we indicated before at the beginning of this article, that is to say, with the help of FileZilla.

Error when creating our .htaccess file from WordPress

Although the situation is somewhat “uncommon”, but there could be a small error when creating this .htaccess file by the method mentioned above, where we will be told in a timely manner, that it is impossible to create such a file because our blog is blocked. In reality the directory is not blocked but rather, has been protected against writing for security reasons, something that surely came to do who facilitated the hosting so you can locate your WordPress blog.

Anyway, a good solution can be adopted again with FileZilla, with our notepad and of course, with a few tricks to follow.

Returning to the last part of the procedure mentioned above, after having clicked on the blue button that says “Save Changes”, an error message could appear a little below it, something that we would suggest through the image that we will place next.

As you can see there, the message mentions that the .htaccess file cannot be created; a little further down there is a small code that we will have to copy in its entirety and then paste it into a blog of notes, to which we will have to give the name of this .htaccess file.

To be able to place this .htaccess file inside the server where our WordPress blog is located we will need more specialized help, since this task involves having to find a “public_html” directory, which is not as easy to find as we would like to explain.

Anyway if you are an expert managing this type of environments through the ftp, this task will not be very difficult that you get to perform; once you have found this public directory you will have to modify its properties and attributes, making it capable of being readable, writeable, executable and a few other functions.