WORDPRESS in SUBDIRECTORY Print

  • wordpress
  • 0

If you have a separate WordPress install in the root directory, then the .htaccess files of your subdirectory will cause conflict. This will result in 404 errors on your website.

To solve this, you need to edit the .htaccess file in your subdirectory WordPress install. Replace the code inside your .htaccess file with the following code:

1
2
3
4
5
6
7
8
9
10
11
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /your-subdirectory/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /your-subdirectory/index.php [L]
</IfModule>
 
# END WordPress

Was this answer helpful?

« Back