How to install wordpress in a sub-directory?

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.

Related Articles

How to fix Error establishing a database connection in WordPress?

An error establishing a database connection in WordPress is a worst nightmare for all WordPress...

How to Add GOOGLE Analytics on Wordpress Website?

Google Analytics is one of the popular tools to get detailed statistical information about...

How to Defer Parsing of JavaScript in WordPress?

If you have tested your WordPress website speed in the website speed testing tool GTMetrix, you...

How to Fix White Screen of Death Error in WordPress?

Everyone who is involved in WordPress development must have faced this annoying white page...

  • 0 Users Found This Useful

Was this answer helpful?