How to Install WordPress on a Subdomain: A Simple Step-by-Step Guide

Installing WordPress on a subdomain is a great way to build a separate part of your website without affecting your main domain. This is useful if you want to create a blog, online store, support area, staging website, learning portal, or any other section that needs its own space.

For example, instead of installing everything on:

example.com

You could create:

blog.example.com
shop.example.com
support.example.com
staging.example.com

A subdomain gives you a clean way to manage different parts of your website while still keeping them connected to your main brand.

What Is a Subdomain?

A subdomain is an extension of your main domain. It works like a separate website, but it still sits under your main domain name. For example, if your main website is example.com, a subdomain could be store.example.com. This allows you to keep different areas of your website organised. You can have a main business website on your primary domain, while your subdomain runs a separate WordPress installation with its own files, database, themes, plugins, and settings.

Why Install WordPress on a Subdomain?

There are many reasons why a business or website owner may want to install WordPress on a subdomain. You may want to launch a blog, create a client portal, test a new website design, build a landing page, or separate an online store from the main company website. A subdomain can also help keep your website structure cleaner and easier to manage. It also gives you more flexibility. Since the subdomain can have its own WordPress installation, you can use different plugins, layouts, and settings without interfering with your main website.

Before You Start: What You Need

Before installing WordPress on a subdomain, make sure you have everything ready. You will need access to your hosting control panel, such as cPanel or Plesk. You will also need access to your domain DNS settings, FTP or SFTP details, and your hosting file manager. You should also make sure your hosting environment supports WordPress. Ideally, your server should support PHP 8.3 or higher, MySQL 8.0 or higher, or MariaDB 10.6 or higher, along with HTTPS support. You should also have an SSL certificate available for the subdomain. Many hosting companies provide free SSL certificates through Let’s Encrypt.

Step 1: Create the Subdomain

The first step is to create the subdomain in your hosting control panel. Log in to your hosting account and look for a section called Subdomains, Domains, or Addon Domains. The wording may be slightly different depending on your hosting provider.

Enter the name of your subdomain. For example, if you want to create a blog, you may enter: blog

Your hosting panel will usually create the full subdomain as: blog.example.com

You will also need to assign a document root. This is the folder where the subdomain files will be stored. A common example would be:

public_html/blog

Once created, your hosting account will prepare a separate folder for the subdomain.

Step 2: Check the DNS Records

After creating the subdomain, check that the DNS record has been created correctly. Most hosting platforms will add the correct DNS record automatically. In many cases, this will be an A record pointing the subdomain to your server IP address. DNS changes may not work instantly. Sometimes they update quickly, but in other cases, they can take a few hours to fully update across the internet. Before continuing, visit your subdomain in a browser. If it loads a default hosting page or shows that the location exists, you are ready to continue.

Step 3: Create a New Database

WordPress needs a database to store your website content, settings, users, posts, pages, and plugin data. In your hosting control panel, go to the database section. This is usually called MySQL Databases, Database Manager, or something similar. Create a new database for the subdomain. Use a clear name that helps you identify it later. Next, create a database user with a strong password. Once the user is created, assign it to the database and give it the required permissions.

Keep the following details saved somewhere safe:

Database name
Database username
Database password
Database host, usually localhost

You will need these details during the WordPress installation.

Step 4: Upload the WordPress Files

Next, download the latest version of WordPress from the official WordPress website. Once downloaded, extract the ZIP file on your computer. You will see the WordPress files and folders, including files such as wp-config-sample.php, wp-content, wp-admin, and wp-includes. Now connect to your server using FTP, SFTP, or your hosting file manager. Open the folder that belongs to your subdomain. This is the document root you created earlier. Upload all the WordPress files into that folder. Once the upload is complete, double-check that the files are inside the correct subdomain folder and not inside an extra nested folder.

Step 5: Set the Correct File Permissions

File permissions help keep your website secure and working correctly. As a general rule, folders should usually be set to 755, and files should usually be set to 644. This helps WordPress read and write the files it needs without making the website too open or vulnerable. Most hosting platforms handle this automatically, but it is still worth checking if the installation does not work as expected.

Step 6: Run the WordPress Installer

Now open your subdomain in a browser. For example: https://blog.example.com. You should see the WordPress installation screen. Select your language, then continue to the database setup screen. Enter the database name, username, password, database host, and table prefix. For better security, you can change the table prefix from the default wp_ to something more unique, such as wp_blog_. Once WordPress connects to the database successfully, continue with the installation. You will then enter your site title, admin username, password, and admin email address. After completing the setup, WordPress will install and give you access to the dashboard.

Step 7: Install an SSL Certificate

An SSL certificate allows your subdomain to load securely using HTTPS. Go back to your hosting control panel and look for SSL/TLS, Let’s Encrypt, or SSL Certificates. Select your subdomain and install the SSL certificate. Once the SSL certificate is active, update your WordPress settings so the website uses HTTPS.

In the WordPress dashboard, go to: Settings > General

Then make sure both the WordPress Address and Site Address use: https://

You can also set up a redirect from HTTP to HTTPS so visitors always land on the secure version of your website.

Step 8: Test the Installation

Once WordPress is installed, test the subdomain properly. Visit the homepage and dashboard. Check that the SSL certificate is active. Make sure images, links, and pages load correctly. You should also test logging in, installing a plugin, uploading media, and saving a page. If everything works, your WordPress subdomain is ready to use.

Common Issues to Watch Out For

Sometimes a subdomain may not load immediately after setup. This is usually due to DNS propagation and may resolve on its own after some time. If WordPress cannot connect to the database, check that the database name, username, password, and host are correct. If you see SSL errors, confirm that the SSL certificate was installed for the subdomain and not only for the main domain. If the website shows a directory listing or a blank page, check that the WordPress files were uploaded into the correct folder.

Need Help Setting Up WordPress?

If you need help creating a subdomain, installing WordPress, setting up SSL, or preparing your website for launch, our team can assist with the full setup from start to finish.

Related Posts

WooCommerce Orders

Understanding how Order Statuses work is the difference between a smooth sale and a customer service nightmare. In WooCommerce, every purchase follows a digital path

Read More »