Home Tech Stuff How to install WordPress in Subdirectory

How to install WordPress in Subdirectory

In this post, we are going to learn how to install WordPress in the Subdirectory of your server. WordPress can be installed in the subfolder of your root directory and your existing domain will not be impacted. Yes, you will be able to browse two websites with one domain name by adding another subfolder to your URL. If your domain is already running on WordPress from the root folder then your URL will be “example.com” and if you want to run multiple websites on WordPress, in that case, you will be adding one folder under the root directory with WordPress in this.

Steps to install WordPress in Subdirectory / Subfolder

Once you installed WordPress in a Subdirectory your existing website won’t be impacted and you will get one more website and your URL will be “example.com/example”. In this tutorial, I am going to add Subfolder “techblog” and my root domain is “websiteseo.me“. 

Step 1

Open your browser and go to WordPress official website and download the WordPress.

Step 2

Login to your cPanel and create one Subdirectory under Pulicl_html ( root directory ). Make sure to keep the subdirectory name as per your blog or website name. I have added my subdirectory as “techblog“.


Step 3

Now upload the WordPress under your Subdirectory which you have downloaded. You can use FTP or you can upload from the cPanel.


Step 4

Extract the WordPress under the subdirectory and later you can delete the WordPress.zip file. Move all the files after extraction from the WordPress folder to your Subdirectory.


Step 5

Create the database along with the database user and give full privileges. This newly created database will be used in newly created WordPress.


Step 6

Finally, open your browser and put the URL including the subdirectory. I have created the subdirectory “techblog” so my URL will be “websiteseo.me/techblog“. Your URL will depend on your domain and subdirectory name.


Step 7

In the next step, put the database details that you have created and click submit.


Step 8

Fill the site title username, password, and email id. This username and password will be used for WordPress login. 


Step 9

Finally, WordPress is installed in a Subdirectory. So, my new website URL is “websiteseo.me/techblog” and WordPress login URL will be “websiteseo.me/techblog/wp-admin/”


Video Tutorial

In this post, we have covered how to install WordPress on Subdirectory and how we used Subdirectory as a website with the same domain name. Remember, create a new database and new database user for every new Subdirectory website, and do not use any previous database for the newly created Subdirectory WordPress site.


Please enter your comment!
Please enter your name here