CAll Us: +1 888-999-8231 Submit Ticket

How To Install WordPress in a Subdirectory [2022]

Running multiple websites is sometimes a huge ask. It calls for extra management, not to mention the high maintenance load.

To many, the solution is to have a subdirectory or subdirectories to hold parts of your website. It fine-tunes how your content appears to readers, making your website easy to comb through.

Before installing WordPress in a subdirectory, it’s essential to capture the definition.

Consider this. A guest room comes in handy when visitors come over to your house. Your visitors enjoy their privacy, and no one takes the sofa for the night.

Subdirectories are extra rooms for website content.

A subdirectory is a section in the website structure under the root domain that houses your website content in a file. It gives your website a smart and classy outlook, which wins visitors over.

WordPress is a popular content management system (CMS) that runs on more than 43% of all websites. Installing WordPress in your subdirectory, by extension to WordPress reach, gives you an edge over your competitors in terms of service and flexibility.

In this post, you’ll learn how to install a WordPress subdirectory step by step. You’ll also learn the difference between a subdomain and a subdirectory and which is better for business.

Is a Subdomain the Same as a Subdirectory?

Many people may confuse a subfolder for a subdomain. However, they’re different in rooting. Both subdomains and subdirectories, sometimes called subfolders, help you categorize content on your website.

Although a subdomain and a subdirectory have similar functions, the subdomain has a different server. In contrast, subdirectories are extensions of a domain on the same server.

If your domain name is, you might want to create a blog for your readers. A subdomain extension for the blog will read, while a subdirectory will read

So which is better between the two for search engine optimization (SEO)? Both subdomains and subdirectories have their advantages.

Google search algorithm sees subdomains as individual websites from parent domains. Therefore and are individual websites in Google’s eyes. The shortcoming is that your new subdomain has no domain authority affiliation with the root website,

Whereas with subdirectories, Google sees it as a branch of the root domain. A subdirectory like enjoys the security and domain authority of the parent website,

It’s clear now that subdirectories have a headstart with domain authority while subdomains have to build theirs. And since you’re trying to lessen the work, subdirectories are in your favor.

Why You Should Install WordPress in Subdirectories

Subfolders help create content sections that are easy to manage within your parent domain. As a result, your website will be more presentable to prospects, which is what you want.

That aside, a subfolder helps you in content management in that you can section out parts of your website. You can easily edit and move categories compared to when you would be doing it to the whole website.

If a specific section of your WordPress site, say contact page, is outdated, you can take action without affecting other parts like the homepage of your WordPress website.

Below are some of the main advantages of installing WordPress in a subdirectory.

Improved User Experience

How effective are subdirectories in managing user experience? 88% of consumers are less likely to return to a website after a bad user experience. Subdirectories categorize content to increase scannability by your readers, gathering more eyes to your website.

Your Website Looks Professional

Professionalism is vital to business growth. Installing WordPress in a subdirectory means you look the part to your audience. Research shows that website design affects 94% of first impressions, either positively or negatively.

Improved SEO for Your Subdirectory

SEO is royalty to Google. Subdirectories don’t change your SEO score but enjoy the same authority as the root domain. Unlike subdomains, you have a starting block in discoverability through the root domain with subdirectories.

Test Environments

Testing environments allow you to experience new tools before launching them on your website.

You can make changes to your website and save them as drafts for publishing. These changes include proposed upgrades to your website.

Subdirectories are a significant part of content segmentation affecting your web authority. Installing WordPress in a subdirectory improves website aesthetics through content compartmentalization within your website.

And who doesn’t like taking a look at a beautiful sight? Everyone does.

5 Steps To Install WordPress in a Subdirectory

WordPress is one of the most accessible CMS platforms to use today. Its praise is for how customizable it is. Installing WordPress in a subdirectory is, therefore, complication-free.

Below, you will learn in five simple steps how to create a subdirectory in your website and make a WordPress installation. But first, let’s talk about requirements.

What You Need To Install WordPress in a Subdirectory

Installing WordPress requires no unique alignment. All you need is a working domain and access to the Internet — a simple process.

If you already have a WordPress installation in your root directory, there’s no need to reinstall it, as it will work just fine on your new subdirectory. Remember, a subdirectory is an extension of the primary domain on the same server. It will enjoy all the customizations and plugins present in the root domain.

An important aspect to consider when creating a new subdirectory is whether it will fit your website bandwidth. Shared web hosting has a capping on size since a server is shared amongst several users.

You can always upgrade to a higher package if you need the space, which most WordPress hosting providers have. If your hosting provider is not matching your needs, consider migrating to a better hosting provider.

You can set up a subdirectory WordPress installation process using File Transfer Protocol (FTP) or through cPanel with your hosting provider. Choose an appealing name for your subdirectory that tells the reader what to expect, for example, a blog or portfolio.

With that out of the way, let’s look into the five actionable steps to installing WordPress on a subdirectory in detail now.

Step 1. Create a New Subdirectory

To install WordPress in a subdirectory, you must first create the subdirectory under the root domain.

Go to your hosting provider client portal and log in to the control panel or FTP client area. From there, access the File Manager. Note that your cPanel might have a different interface as the one below, but find the File Manager regardless.

On the file manager, create a new file under the /public_html/ folder. Choose a name not already existing in the folder, as this might bring clashes within your main site.

Also, align your subdirectory name with related content; for example, name your subfolder blog for posting blog content.

If your name is longer than one word, don’t leave a space to separate the two words. Instead, use a hyphen ( – ) between the two words, as in [blog-content].

You’ve now successfully created a subdirectory, and you can proceed to install WordPress.

Step 2. Import WordPress Files

Go to using any browser to download WordPress CMS.

Note the difference between and

In this case, you need the WordPress software downloaded on Go to the website and click the Get WordPress button at the top.

On the next screen, click the download and install link to download WordPress to your local computer.

Alternatively, you can download WordPress directly from the download page. Ensure that you download the latest version of WordPress to get the best experience using it. Also, some plugins don’t work with outdated WordPress versions.

After a successful WordPress download, the next step is to import it to your new subdirectory.

Access the new subdirectory via the File Manager on your cPanel, and open the root WordPress folder. Open the new subfolder and click on Upload at the top of the cPanel. You can find the zipped file download in the downloads section on your device.

After uploading the zipped file, go to the new subdirectory and click on the uploaded file. Hit Extract at the right top corner of the current cPanel screen. This command will extract files into a file now named WordPress.

You have no further use for the zipped file now —  delete it.

Now, your WordPress is in the WordPress folder, not the new subdirectory you have created. You need to change that.

Select all files in the newly created WordPress folder and right-click for a drop-down menu. Select Move, and a popup will come for you to select the path. Here, designate the new subdirectory as the destination and move the files.

Wait for the process to be complete. Check if the WordPress files are in the new subdirectory, after which you can delete the WordPress folder.

Step 3. Create a New Database

Creating a new database is essential as it will hold the login details of the new subfolder. After this step, you can install WordPress in the new subdirectory.

On the cPanel’s main screen, navigate to MySQL Database on the databases section. Click on it and create a new database by entering a name for the new database.

Then press the Create Database button.

Scroll down to the Add New User under MySQL Users, filling all fields as required. Note the username and password used here, as you will use these details later to log in to the subdirectory.

Scroll down again to add users to the database section, select the new database and user, and then press the add button.

On the next screen, add user privileges to the new user. This step allows you to define what the new user can do to the database of your new subdirectory. Check all boxes since you are the admin of the website. You can edit these permissions if the need arises.

Step 4. Install WordPress

You have created a subdirectory and a database. Now what remains is to install WordPress to the subdirectory. You’ve already done the heavy lifting, so here you go with the light stuff.

Search for domain/subdirectory on your browser, for example, A drop-down menu allows you to select your preferred language, say English.

After that, you will see the login page; enter your database name, username, and password saved earlier when creating your database in step three.

Hit submit after filling in the information correctly.

You will now see a tab asking you to run the WordPress installation. Confirm this step, and insert details in the open fields on the following screen. Enter the details as per the new user details in step three.

You can now log in to your new WordPress subdirectory!

But before you pop the champagne, there’s one more thing you have to do.

Step 5. Edit Permalinks

The last step in installing WordPress in the subdirectory is to edit your subdirectory permalinks.

A mismatch between the .htaccess in the root domain and the new subdirectory can cause permalink issues when you open your new subdirectory, like 404 errors.

Enable hidden files if you cannot locate your subdirectory’s .htaccess files. To do this, go to the cPanel settings page, click on the Show hidden files (.dotfiles) option, and hit save.

Add the following code to your .htaccess to match the main domain.

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /your-subdirectory/
 #Replace /your subdirectory/ with your subdirectory name

RewriteRule  ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  /your-subdirectory/index.php [L]
 #Replace /your subdirectory/ with your subdirectory name
# END WordPress

Go to your new subdirectory and right-click on the .htaccess file. From the drop-down menu, select edit and insert the code above. Hit save changes, and you’re all done, finally.

Don’t forget to change the code before executing. Replace /your-subdirectory/ part with the name of your subdirectory.

Final Thoughts: How To Install WordPress in a Subdirectory

Creating a subdirectory is a step forward to decluttering your website. You can have the advantages of SEO from the root domain yet have separate folders for specific website landings. A WordPress installation in a subdirectory adds customization and ease of running multiple WordPress instances, multi-site style.

WordPress websites are fully customizable, making them ideal for small and large brands. Build a faster and fully scalable website for your business using Hostdedi WordPress hosting. Contact us today to get a package that suits you best.

Source link

About the Author