How to install wordpress in a sub-directory? Print

  • 0

By installing Wordpress on a sub-directory, you can run multiple wordpress within the same domain or with on a sub-domain. We will show you how you can install and run wordpress on the sub-directory.

Create a sub-directory inside your wordpress installation. 

  1. You can connect your existing wordpress installation using cPanel File manager or using FTP.

  2. Once it is connected, create a sub-directory. 





  3. Let us upload wordpress zip into that sub-directory. Unzip and extract it. 

  4. Add the wordpress database details in wp-config.php

  5. Install wordpress at the installation page

  6. Access the wordpress admin installed within the sub-directory page.  

If there is a separate Wordpress is installed at the root directory, we will need to put the below code in the .htaccess file of your sub-directory. You will need to replace the /subdirectory to your subdirectory name.  

# BEGIN WordPress
RewriteEngine On
RewriteBase /subdirectory/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.php [L]

# END WordPress

This is it. We are done with installing wordpress on a separate sub-directory.


Was this answer helpful?

« Back
Sign up for a newsletter

chat