Start a conversation

cPanel Index and Redirect Settings (WordPress)

How to change index or redirect when WordPress gives a 404 error:
or Cannot access wp-admin, all pages give 404 error

You will need to edit/create .htaccess file in the public_html folder
(if you do not see this file, turn on hidden files in settings)


edit the .htaccess file to include: (one of the 2 sets of code below)

# BEGIN WordPress
<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


Assuming your WordPress is installed in wp/  then you would need to use the following:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
</IfModule>
# END WordPress


also see:   Using Permalinks



Errors on This Page?

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Jay

  2. Posted
  3. Updated

Comments