◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Hosting → Install WordPress
How to install WordPress on a subdomain
Installing WordPress on a subdomain is one of the easiest ways to launch a new section of your site—without touching your main website. Whether you want to build a blog, create a custom landing page, or test design changes, setting up WordPress on a subdomain gives you a clean slate to work from.
Let’s walk through everything you need to know, from creating the subdomain to running the WordPress installer and getting into your dashboard.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
What is a subdomain and why use one?
A subdomain is a separate section of your website that lives under your main domain name. For example, if your main site is example.com, a subdomain might be blog.example.com, shop.example.com, or dev.example.com.
Subdomains are useful because they let you create a new site or section without needing to buy another domain name. You can run an entirely different WordPress installation on a subdomain, which is perfect for:
- Starting a blog without changing your main site
- Creating a test or staging site
- Running a regional or language-specific version of your site
- Launching a new service or product page
Step 1: Create the subdomain in your hosting control panel
The first step is to create the subdomain using your hosting provider’s control panel. Most popular hosts use cPanel or a custom dashboard.
In cPanel:
- Log in to your hosting control panel (usually at yourdomain.com/cpanel).
- Find and click the Subdomains option under the “Domains” section.
- In the “Create a Subdomain” form:
- Enter your subdomain name (e.g., blog)
- Choose the domain you want to attach it to (e.g., example.com)
- The “Document Root” will fill in automatically (e.g., public_html/blog)
- Enter your subdomain name (e.g., blog)
- Click Create.
Once created, your subdomain directory will appear in your file manager. It might take a few minutes to be accessible online due to DNS propagation.
Step 2: Download and upload the WordPress files
Now it’s time to install WordPress on your new subdomain by uploading the core WordPress files.
- Go to wordpress.org and download the latest version of WordPress.
- Unzip the downloaded .zip file on your computer.
- Open your hosting file manager (or connect via FTP using an app like FileZilla).
- Navigate to the document root folder of your subdomain (e.g., public_html/blog).
- Upload all the WordPress files (everything inside the wordpress folder) into that directory.
- If you’re using a file manager, you may need to extract the .zip file after uploading.
Double-check that the index.php and wp-config-sample.php files are directly inside the subdomain folder—not inside another folder.
Step 3: Create a new MySQL database and user
WordPress needs a database to store all your content and site settings. You’ll need to create one specifically for the subdomain.
In cPanel:
- Go back to your hosting control panel and open MySQL Databases.
- Under “Create New Database,” enter a name and click Create Database.
- Scroll down to “MySQL Users.” Create a new user with a username and secure password.
- Scroll to “Add User to Database.” Choose the user and database you just created.
- Select All Privileges, then click Make Changes.
Write down the:
- Database name
- Database username
- Password
You’ll need them in the next step.
Step 4: Run the WordPress installation script
With your files uploaded and database ready, it’s time to install WordPress.
- Open your browser and visit your new subdomain (e.g., blog.example.com).
- You should see the WordPress setup screen. Click Let’s go! to start.
- Enter your database details from the last step:
- Database name
- Username
- Password
- Database host (usually localhost)
- Table prefix (leave as wp_ unless you have a reason to change it)
- Database name
- Click Submit and then Run the installation.
- Enter your site title, admin username, password, and email.
- Click Install WordPress.
Once the install finishes, you’ll see a success message with a button to log in.
Step 5: Log in and start building
You can now log in to your new subdomain’s WordPress dashboard.
- Go to blog.example.com/wp-admin.
- Log in with the username and password you created during installation.
- From here, you can start customizing your theme, installing plugins, and adding content.
Optional: Set up SSL and redirect HTTP to HTTPS
Most hosting plans come with a free SSL certificate, but your subdomain may need one manually installed.
To check and enable SSL:
- In cPanel, go to SSL/TLS or Let’s Encrypt.
- Find your subdomain and install a certificate if it doesn’t already have one.
- Add a redirect in .htaccess to force HTTPS
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]Secure connections protect user data and are better for SEO.
Troubleshooting common issues
Things don’t always go according to plan …
My subdomain isn’t loading.
- Double-check the subdomain was created correctly.
- Wait for DNS to finish propagating (can take a few hours).
- Try clearing your browser cache.
I see a file list instead of the WordPress installer.
- Make sure you uploaded the contents of the WordPress folder, not the folder itself.
- Confirm index.php exists in the document root.
Error establishing a database connection.
- Recheck your wp-config.php settings.
- Make sure the database name, username, and password match exactly.
- Confirm the user has been added to the database with full privileges.
Subdomains and SEO
An important consideration to keep in mind is that subdomains are treated as separate sites by search engines like Google. That means blog.example.com is indexed and ranked independently from example.com. This has both advantages and drawbacks depending on how you’re using the subdomain.
Pros of using subdomains for SEO
- Focused content strategy: A subdomain can help you organize content for a distinct audience or purpose, like a blog, shop, or support center, without mixing it into your main site’s structure.
- Keyword targeting: You can optimize the subdomain around specific keywords without diluting the focus of your main site.
- International or multilingual SEO: Subdomains are often used for regional targeting (e.g., fr.example.com) and can be geo-targeted in Google Search Console.
Cons of using subdomains for SEO
- Link authority is split: A subdomain doesn’t automatically inherit your main domain’s SEO authority. You’ll need to build backlinks and optimize it like a separate site.
- Separate technical setup: SEO tools like analytics, sitemaps, and Search Console require separate configuration for each subdomain.
- Duplicate content risk: If content is copied between your main domain and subdomain, it can confuse search engines and lead to indexing issues.
When subdomains make sense
Use a subdomain when the content truly serves a different function or audience than your main site. For example:
- A developer portal (dev.example.com)
- A blog with different branding or tone (blog.example.com)
- A learning management system or course portal
If the content is closely tied to your main topic and meant to rank alongside your main site pages, a subdirectory (like example.com/blog) might be better for consolidating SEO value.
Getting started with WordPress on a subdomain
Installing WordPress on a subdomain is a simple way to expand your site without starting from scratch. Whether you’re building a blog, a shop, or a testing environment, subdomains help keep things organized and separate.
To get started, create a subdomain in your hosting panel, upload WordPress, and set up a database. In just a few steps, you’ll have a brand new WordPress site up and running.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
What is managed WordPress hosting? →
Get details and decide if managed WordPress hosting is right for you.
What’s the difference between WordPress hosting & web hosting? →
Compare WordPress hosting with traditional web hosting to find the best fit for your website’s needs.
A complete guide to WordPress shortcodes →
Shortcodes make life easier. Learn how to get started!