07-17-2023, 11:48 AM
How to Locate and Create the WordPress .htaccess File on cPanel
Locating the .htaccess File
- Log into your cPanel account.Locate the Files section and click File Manager
- Access the public_html directory. Click on your WordPress folder. In this case, it’s labeled as wp. Then, look for the .htaccess file.
- If you can’t find the .htaccess file, go to the Settings on the upper right menu and tick the Show Hidden Files option to enable viewing.
- The system will begin to fetch your directories’ content, and you will soon see the .htaccess file on the list.
- Simply click on the file and check the Edit button to open it.
Important Notes
- If you have more than one domain in your hosting plan, each domain will have its own .htaccess file in its public_html directory.
- Since .htaccess is a server configuration file, messing up the code can cause server errors.
- It is highly recommended to create a backup. This way, you can restore your WordPress site to its stable state whenever an error happens.

