• Get In Touch
April 13, 2018

How To Install WordPress In A Sub-Directory

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Do you want to install WordPress in a subdirectory? Installing WordPress in a sub-directory allows you to run multiple WordPress instances under the same domain or even a subdomain name. In this article, we will show you how to install WordPress in a sub-directory without affecting the parent domain name.

1. Create A Subdirectory Under The Root Domain Name

First, you need to create a sub-directory or folder under your root domain name. This is where you will install WordPress files.

Connect to your WordPress hosting account using an FTP client or File Manager in cPanel.

Once connected, go to the root folder of your website. Usually it is the /public_html/ folder. If you already have WordPress installed in the root folder, then you will see your WordPress files and folders there.

Next, you need to right click and select ‘Create new directory’ from the menu. You need to be careful when choosing the name for your sub-directory. This will be part of your new WordPress site’s URL and what your users will type in their browsers to reach this website.

2. Upload Your WordPress Files

Your newly created sub-directory is empty at the moment. Let’s change that by uploading WordPress files.

First, you need to visit WordPress.org website and click on the download button.

Your browser will now download the zip file containing the latest WordPress software to your computer.

After downloading the file, you need to select and extract it. Mac users can double-click the file to extract it and Windows users need to right click and then select ‘Extract All’.

After extracting the zip file, you will see ‘wordpress’ folder containing all the WordPress files. Now let’s upload these files to your new subdirectory. Connect to your website using an FTP client and go to the subdirectory you created in the first step. In the local files panel of your FTP client, go to to the WordPress folder you just extracted. Select all files in the WordPress folder and then upload them to your new sub-directory.

3. Create A New Database

WordPress stores all your content in a database. You need to create a new database to use with your new WordPress site installed in a sub-directory.

First, you need to login to the cPanel dashboard of your WordPress hosting account. Click on ‘MySQL Databases’ under the databases section.

On the next screen, you will need to provide a name for your new database and then click on ‘Create Database’ button to continue.

Your cPanel dashboard will now create the new MySQL database. In order to use this database, you need to create a MySQL username. Scroll down to the MySQL Users section and provide a new username and password. Click on the ‘Create User’ button to continue.

Next, you need to give this newly created user privileges to work on the database you created earlier. Scroll down to ‘Add user to database’ section. Select your MySQL username and then select your newly created database.

Click on the “Add” button to continue. Cpanel will now grant the MySQL user full privileges on your newly created database.

4. Install WordPress

Now that everything is in place, you can go ahead and install WordPress. Simply visit the directory you created earlier in a web browser by typing the URL like this: http://example.com/your-subdirectory-name/.

This will bring up the WordPress installation wizard. First, you need to select the language for your WordPress website and click on the continue button. Next, you will be asked to provide your WordPress database name, database username, password, and host. Enter the database details and click on the submit button.

WordPress will now connect to your database and you will see a success message like this:

Click on ‘Run the install’ button to continue. On the next screen, you will be asked to provide a title for your website and choose an admin username, password, and email address.

After entering your website details, click on ‘Run install’ button to continue. WordPress will now set up your website and will show you a success message like this:

You can now go ahead and login to your new WordPress website installed in the sub-directory.

Using Wordpress? Get our lightening fast Wordpress Optimised Hosting.
Get Wordpress Hosting

Share this Article!

Related Posts

5 Website Hosting Solution Trends for 2022 and Beyond

5 Website Hosting Solution Trends for 2022 and Beyond

Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with the choices. Hence, you must […]

64 Content Marketing Statistics Demonstrating the Power of Content

64 Content Marketing Statistics Demonstrating the Power of Content

Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your domain authority, demonstrate your thought […]

53 User Experience Stats for 2022

53 User Experience Stats for 2022

User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading pages, clunky navigation, or errors, […]

How to increase the memory limit in WordPress

How to increase the memory limit in WordPress

Do you need to increase the memory limit in WordPress? Getting an error about memory Exhausted? The memory limit is one of the most common WordPress errors as the default limit of memory in WordPress is only set to 64mb! But there’s good news! The Memory Exhausted error is one of the easiest to fix […]

All in One WordPress Migration Vulnerability

All in One WordPress Migration Vulnerability

A vulnerability has been discovered in the “All In One WordPress Migration” WordPress plugin. All versions earlier than, and including 6.97 contain a vulnerability which allows Cross-Site Scripting (XSS). With over 2 million active installations, this vulnerability has the potential to be high impact, however, this is lessened by the nature of the vulnerability, which […]