Latest Technology News, Mobile, Laptop, Gadgets and Much More

How to Edit .htaccess File Using cPanel File Manager

1 2,122

What is The WordPress .htaccess file?

.htaccess is a configuration file for use on web servers running the Apache Web Server software. When a .htaccess file is placed in a directory which is in turn ‘loaded via the Apache Web Server’, then the .htaccess file is detected and executed by the Apache Web Server software

The default Code for Your WordPress .htaccess file

# BEGIN WordPress
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

How to Edit .htaccess File Using cPanel File Manager

Editing a .htaccess file using cPanel file manager is the recommended method as it offers powerful direct editing of the .htaccess file, and is accessible whether the file contains an error or not.

To edit the .htaccess file using the cPanel file manager follow the steps:

1/- Log in to the cPanel

2/- Scroll down and click File Manager

How to Edit .htaccess File Using cPanel File Manage

3/- Check the option to show the hidden files in File Manager

4/- In File manager find public_html

Must Read: How to Edit .htaccess File Using Yoast SEO Plugin

5/- Navigate to the root folder of the website whose .htaccess file you want to edit.

6/- Select the .htaccess file, right-click and choose Code Edit. You can select a Download option to make a backup file on your desktop.

How to Edit .htaccess File Using cPanel File Manage

Be careful: One Mistake and Your Site Will Disappear

Any single mistake in .htaccess file results in the webserver returns a blank page or error 500. So some precautions should be taken while updating the .htaccess file. always make a backup or download the current .htaccess file. you can save the backup on your desktop so that if anything goes wrong, it will be easy to restore the backup file. after a successful edit, do check your website in a different browser. Clear browser history, this reduces the risk of picking up a cached page. don’t use Yoast SEO for having significant changes in .htaccess because if you broke up with your site, you can’t restore the backup using Yoast SEO plugin.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More