Reset .htaccess File

How to Reset the htaccess File of Your WordPress Site Using FTP

If you just landed on this page then I am pretty sure that you try to mess with your htaccess file and got an error of 502 Bad Gateway error or a white blank screen error. Even you are unable to access your WordPress dahboard. You can fix this error by simply reset your htaccess file on your WordPress website. The steps below assume that you have FTP software (I prefer FileZilla) installed and that you have loaded your FTP details into the Site Manager (you can get these details from your web host, and often this is simply: host address, username, and password).

If you don’t have any FTP client or you are not familiar with FTP then you should read this tutorial to learn how to use FTP tools.


  • Login to you web server via FTP or SFTP (check out your hosting for these settings).
  • Most of the time you landed to the root folder of your web server. You have to browse your folder where your WordPress files are located. Most of the time your WordPress files are located under "public_html" folder.
  • Once you landed to the right folder and find the .htaccess file. First of all, you have to make a backup of your existing .htaccess file. You can do that by right-clicking it and click "Rename". Rename your ".htaccess" file to ".htaccess_backup".
  • Download ".htaccess_backup" file by double clicking it. Make sure you remember where you have download that file.
  • Now rename the downloaded file ".htaccess_backup" back to original name file name ".htaccess".
  • Open the downloaded file .htaccess in a text editor and delete ALL text within it.
  • Copy the below text in to your .htaccess file.
# BEGIN WordPressRewriteEngine OnRewriteBase /RewriteRule ^index.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]# END WordPress
  • Save the file.
  • Open FileZilla and upload your saved file .htaccess back to your server by double clicking it. 

That's it....

Now browse your website and it works perfectly. Now start doing other changes one by one. First, try to implement the small changes and then go for the large one. After each change re-check your website. This way you can find where the problem was previously on your .htaccess file.

Please share and comments your ideas regarding this post. If you find this post helpful, then please share it with your friends......

About the Author Muhammad Basim

follow me on:

Leave a Comment: