Create a Subdomain in cPanel and Install WordPress on It

Want a blog at blog.yoursite.com or a test area at staging.yoursite.com without buying a new domain? Learning how to create a subdomain in cPanel and install WordPress on it gives you exactly that, for free, in about fifteen minutes. In this guide, I will show you the complete process: creating the subdomain in cPanel, installing WordPress on it with Softaculous, the manual method as a backup, and the DNS details you need to know.
What Is a Subdomain and When Do You Need One?
A subdomain is a section of your main domain that works like its own website. If your domain is yoursite.com, then blog.yoursite.com and shop.yoursite.com are subdomains. Common uses include a separate blog, a staging copy for testing changes safely, a help center, or a second language version of your site. Most shared hosting plans let you create unlimited subdomains at no extra cost, so it is worth learning.
How Do You Create a Subdomain in cPanel?
- Log in to your hosting account and open cPanel.
- Scroll to the Domains section and click Subdomains. (On newer cPanel versions with the updated interface, go to Domains and click Create A New Domain, then enter your subdomain.)
- In the Subdomain field, type the name you want, for example blog. cPanel automatically fills in your main domain, showing blog.yoursite.com.
- Check the Document Root field. cPanel suggests something like public_html/blog. Keep the default unless you have a reason to change it – this folder is where your subdomain’s files will live.
- Click Create. cPanel confirms the subdomain is ready within seconds.
Your subdomain now exists, but it shows an empty directory page because nothing is installed there yet. That is the next step.
How Do You Install WordPress on the Subdomain with Softaculous?
Softaculous is the one-click installer included with most cPanel hosting. It is the fastest way to get WordPress running on your new subdomain:
- In cPanel, find the Software section and click Softaculous Apps Installer.
- Click the WordPress icon, then click Install Now.
- Under Choose Installation URL, select https:// as the protocol, then choose your subdomain (blog.yoursite.com) from the domain dropdown. Leave the In Directory field empty so WordPress installs at the subdomain root.
- Fill in your Site Name, Site Description, and create a strong Admin Username and Password. Do not use “admin” as the username.
- Enter your admin email, choose your language, and click Install.
- Wait about a minute. Softaculous shows your new login URL, usually https://blog.yoursite.com/wp-admin.
Visit the subdomain in your browser. If you see a fresh WordPress site with the default theme, the installation worked. If you see a security warning about the certificate, wait a few minutes – most hosts issue the free SSL automatically shortly after subdomain creation.
What If Softaculous Is Not Available?
Some hosts do not include Softaculous. In that case, install WordPress manually – it takes about ten minutes:
- Download WordPress from wordpress.org and unzip it on your computer.
- In cPanel, open MySQL Databases and create a new database and database user, then add the user to the database with all privileges. Note down the database name, username, and password.
- Open File Manager, navigate to your subdomain’s folder (public_html/blog), and upload the WordPress files there.
- Visit blog.yoursite.com in your browser and follow the famous five-minute installation wizard, entering your database details when asked.
How Do You Delete a Subdomain?
Finished with a test site or staging area? Cleaning up is just as easy as creating:
- In cPanel, go back to Subdomains (or Domains in the newer interface).
- Find your subdomain in the list and click Remove or Delete.
- cPanel asks whether to also delete the document root folder and its files. If you are sure you no longer need anything there, confirm the deletion to free up disk space.
Warning: deleting the document root permanently removes every file in that folder, including any WordPress installation and uploads. Download a backup first if there is anything you might want later.
Do You Need to Change Any DNS Settings?
In almost all cases, no. When you create a subdomain in cPanel, the hosting server automatically adds the DNS record for it, and it starts working within minutes. You only need to touch DNS manually if your domain’s nameservers point somewhere else (for example Cloudflare) – then add an A record for the subdomain pointing to your hosting IP. If the subdomain does not load after an hour, DNS is the first place to check.
If you use Cloudflare, there is one extra step: after adding the A record, make sure the SSL mode in Cloudflare is set to Full or Full (Strict) so the connection between Cloudflare and your host stays encrypted. A common beginner mistake is leaving it on Flexible, which causes redirect loops on WordPress subdomains. When in doubt, purge the Cloudflare cache for the subdomain after making changes.
Troubleshooting: Subdomain Not Working?
- Subdomain shows the main site instead. You probably installed WordPress in the wrong folder. Check that the files are inside the subdomain’s document root (public_html/blog), not the main public_html folder.
- SSL warning on the subdomain. Wait 15 to 30 minutes for the auto SSL to issue. If it persists, check your host’s SSL status page and run the auto SSL tool manually for that subdomain.
- Subdomain works on your phone but not your laptop. Classic DNS caching. Flush your local DNS or simply wait – propagation can take up to a few hours on some networks.
Practical Tips for Subdomain WordPress Sites
- Use subdomains for staging: clone your main site to staging.yoursite.com, test updates there, then apply them to the live site safely.
- Install an SSL certificate on every subdomain. Most hosts cover subdomains with a free wildcard or auto SSL – verify the padlock appears.
- Keep the WordPress installations on your subdomains updated just like your main site. Forgotten subdomain installs are a common security risk.
- Label your subdomains clearly in cPanel. Names like staging, dev, and test tell future-you exactly what each one is for, which prevents accidental deletions a year from now.
Frequently Asked Questions
Is a subdomain free with shared hosting?
Yes. Nearly all shared hosting plans, including the budget ones in our web hosting comparison, let you create unlimited subdomains at no extra charge. You only pay for the main domain and the hosting plan itself.
Subdomain or subdirectory: which is better for SEO?
For most beginners, a subdirectory (yoursite.com/blog) is simpler for SEO because it shares the main domain’s authority. Use a subdomain when the content is truly separate, like a store, forum, or staging environment. Google treats subdomains as separate sites, so choose based on your structure, not on myths.
Why is my new subdomain showing a 404 or directory listing?
A directory listing means the subdomain exists but WordPress is not installed there yet – complete the Softaculous install above. A 404 right after creation usually means DNS is still propagating; wait up to an hour and try again in a private window.
Can I install a different theme on the subdomain?
Yes. Each WordPress installation is completely independent, with its own themes, plugins, and settings. Your subdomain can look entirely different from your main site, which makes subdomains perfect for testing new designs safely.
Last updated: October 2026.
Related Guides
- How to Transfer a Domain from GoDaddy to Namecheap (2026 Guide)
- What Is Domain Privacy Protection and Do You Need It?
One Comment