How to Create the WordPress htaccess File In C-Panel

How to Create the WordPress htaccess File In C-Panel

Are you wanting to update your .htaccess file? Or maybe you accidentally deleted the file? Don’t worry we have you covered, in this article we will show you how to create the default WordPress .htaccess file so you can bring it back to normal.

What Is the htaccess File?

The htaccess file is an essential WordPress core file to reconfigure specific settings of the Apache Web Server. The .htaccess file helps you enable or disable features of your server, for example forcing your site to run HTTPS and redirect HTTP links.

How to Create the WordPress .htaccess File?

  1. Head over to your hosting providers C-Panel

Clicking on file manager in c panel conor bradley digital agency

  1. Click File Manager.

Clicking on new file then calling the file name. Htaccess then clicking create conor bradley digital agency

  1. Open the public_html folder and click the New File icon at the top-left of the page.
    * If you’re unsure if you have the .htaccess file click the settings cog in the top, right and tick “show hidden files”. If you have the file it will appear.
  2. Name the file “.htaccess”.

Opening the. Htaccess file then typing in the following code conor bradley digital agency

  1. Open the new WordPress .htaccess file and paste the following code:
    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule># END WordPress
  2. Hit Save & Close.

You have now created or edited your .htaccess file to the default one! Make sure you check your website is working correctly by clearing the cache of your browser.


                                             Facebook | Twitter | Instagram | Youtube | Vimeo | Blog | Knowledge Base