India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Turkey Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Canada English
Canada Français
Somalia English
Netherlands Nederlands

How to Install WordPress on Subdomain cPanel

Ever wondered how to install a WordPress site on a subdomain using cPanel?

How to Install WordPress on Subdomain cPanel

Whether you want to test new features, create a staging environment, or even host a separate blog or portfolio, how to install WordPress on a subdomain in cPanel can be super handy.

Let’s break it down together so you can get your subdomain up and running in no time!

In this guide, I’ll walk you through each step of the process.

By the end, you’ll have your very own WordPress install site on a subdomain in cPanel, ready for you to customize and fill with content.

Let’s get started!

What is a Subdomain?

A subdomain is like a branch of your main website.

It’s a separate part of your domain that lets you create different areas or sites under one main address.

For example, if your main domain is example.com, you could have a subdomain like blog.example.com or shop.example.com.

Subdomains are handy for keeping things organized and can be used for different purposes, like running a blog, an online store, or targeting different audiences.

Difference Between a Subdomain and a Regular Domain

Here’s the main difference:

Regular Domain: This is your main web address, like example.com, where you can host an entire website.

Subdomain: This is a section of your main domain, like blog.example.com, where you can create a separate site or area still connected to your main domain.

Why Use a Subdomain for WordPress?

Using a subdomain for WordPress can be really helpful in these situations:

Hosting a Separate Blog: If you want to keep your blog separate from your main site, a subdomain like blog.example.com is a great way to do that.

Creating an Online Store: For e-commerce, setting up a store on a subdomain like shop.example.com helps keep your shopping site focused without cluttering your main site.

Testing New Features: Subdomains are perfect for trying out new features or designs without affecting your main site.

You can use something like test.example.com for this.

How to Install WordPress on Subdomain cPanel

Targeting Specific Audiences: If your site serves different regions or groups, you can use subdomains like us.example.com or uk.example.com to tailor content for each audience.

Step 1: Creating a Subdomain in cPanel

Creating a subdomain in cPanel is pretty simple. Let’s walk through it step by step, starting with logging into your cPanel account.

Accessing cPanel

To get started, you’ll need to log into your cPanel account. Here’s how:

Open Your Web Browser: Launch the web browser you normally use.

Enter the cPanel URL: Type in your cPanel address. It’s usually something like https://yourdomain.com/cpanel or https://yourdomain.com:2083.

Log In: Enter your username and password provided by your web hosting company.

After that, just hit the “Log in” button, and you’ll be taken to your cPanel dashboard.

Steps to Create a Subdomain

Now that you’re in cPanel, let’s create your subdomain:

Go to the Domains Section: Find the “Domains” section in your cPanel dashboard. It’s usually easy to spot.

Click on “Domains” or “Subdomains”: In the “Domains” section, click on the “Domains” or “Subdomains” option.

This will bring you to the subdomain creation page.

Enter the Subdomain Name: Type in the name you want for your subdomain.

For example, if you’re making a blog, you might enter “blog” to create blog.example.com.

Select the Parent Domain: If you have more than one domain, pick the right one from the dropdown menu.

Clear the “Share Document Root” Checkbox: Make sure to uncheck this option so your subdomain has its own directory.

Set the Document Root: This is where your subdomain’s files will live. cPanel usually suggests a directory name based on your subdomain (like /public_html/blog).

You can stick with the default or choose a different one.

Submit the Form: Once everything looks good, click the “Create” button.

You should see a message saying your subdomain has been successfully created.

Verifying the Subdomain

To make sure everything worked:

Access the Subdomain URL: Open a browser and go to your new subdomain’s URL (like blog.example.com).

Check for Default Page: You should see a default page or a message saying your subdomain is active.

Use cPanel’s Subdomain List: Go back to the “Subdomains” section in cPanel to see a list of all your subdomains.

Your new one should be there, confirming it was created successfully.

Step 2: Getting Ready to Install WordPress

Before we dive into installing WordPress, there are a couple of things we need to set up.

First, we’ll create a MySQL database, and then we’ll download WordPress.

Setting Up a Database

To get started, we need to set up a MySQL database in cPanel. Here’s how you can do it:

Find “MySQL® Databases” in cPanel: Log into your cPanel account, and in the “Databases” section, click on “MySQL® Databases.”

Create a New Database: In the “Create New Database” section, type in a name for your new database—something related to your WordPress site like wp_subdomain. Click “Create Database” to finish.

create new database

Create a New User: Scroll down to the “MySQL Users” section.

Here, you’ll create a new user by entering a username and a strong password. Click “Create User” once you’re done.

MySQL new user

Assign the User to the Database: Now, let’s connect the user to the database.

In the “Add User to Database” section, choose the user and the database you just created from the dropdown menus.

Click “Add,” then give the user “All Privileges” by selecting that option, and click “Make Changes” to save.

Downloading WordPress

Next, we need to grab the latest version of WordPress.

Visit the WordPress Website: Open your web browser and go to the official WordPress website at https://wordpress.org/download/.

Download the Latest Version: Click the “Download WordPress” button to get the latest version. It’ll download as a zip file.

Upload the WordPress Zip File: Using the cPanel File Manager, go to the document root of your subdomain (like public_html/blog if your subdomain is blog.example.com).

Click “Upload” and choose the WordPress zip file you just downloaded.

After the upload is complete, extract the files from the zip archive in the document root of your subdomain.

Step 3: Installing WordPress on the Subdomain

Let’s get WordPress up and running on your subdomain. It’s easier than it sounds, so don’t worry! Here’s what you’ll need to do:

Extracting WordPress Files

After you’ve uploaded the WordPress zip file to your subdomain’s document root, the next step is to extract those files:

Open File Manager: Head over to your cPanel dashboard, find the “Files” section, and click on “File Manager.”

This will open a window showing your website’s file structure.

Navigate to the Document Root: In File Manager, go to the document root of your subdomain, like public_html/blog.

Locate the WordPress Zip File: Look for the WordPress zip file you uploaded.

It might be named something like latest.zip.

Extract the Files: Right-click the zip file and choose “Extract.”

A box will pop up asking where you want to extract the files.

Just confirm the location (it should automatically be the current directory) and click “Extract File(s).”

Once done, you’ll see a new folder named wordpress with all the WordPress files inside.

Move Files to the Root Directory (if needed): If you need to, you can move the contents of the wordpress folder to the root of your subdomain.

Select everything inside the wordpress folder, right-click, and choose “Move.”

Enter the path to your subdomain’s document root, like /public_html/blog/, and click “Move File(s).”

After that, feel free to delete the empty wordpress folder and the original zip file.

Starting the Installation Process

How to Install WordPress on Subdomain cPanel

Now that your WordPress files are in place, it’s time to start the installation:

Open Your Subdomain in a Web Browser: Type your subdomain URL into your browser’s address bar (for example, http://blog.example.com).

This will kick off the WordPress installation process.

Choose Your Language: On the setup page, pick your language from the dropdown menu and click “Continue.”

Configuring WordPress

During setup, you’ll need to enter some database information:

A. Enter Database Details: You’ll be asked for the following:

Database Name: Enter the name of the database you created (like wp_subdomain).

Username: Enter the MySQL username you created.

Password: Enter the password for that MySQL user.

Database Host: Usually, leave this as localhost unless your host tells you otherwise.

Table Prefix: You can leave this as wp_ or change it to something unique if you’re running multiple WordPress sites in the same database.

B. After entering these details, click “Submit.”

C. Set Up Site Title, Admin Username, and Password: On the next screen, you’ll provide:

Site Title: The name of your new WordPress site.

Admin Username: Pick a username for the admin account (avoid using “admin” for better security).

Admin Password: Create a strong password.

Your Email: Enter an email where you’ll get notifications.

D. Once everything is filled out, click “Install WordPress.”

Finalizing the Installation

Complete the Installation: After a few moments, you should see a success message letting you know WordPress is installed.

Log Into the WordPress Dashboard: Click the “Log In” button to access your new site.

Use the admin username and password you created to get into the WordPress dashboard.

And that’s it—you’re all set!

Step 4: Installing WordPress with Softaculous

Ready to set up WordPress? Let’s do it the easy way with Softaculous!

Open Softaculous

First, log into your cPanel account.

Depending on your cPanel theme, finding Softaculous might be a bit different:

Jupiter Theme: Look in the “Software/Services” section for the Softaculous icon.

Paper Lantern Theme: Click on “Softaculous Apps Installer” in the “Software/Services” section.

Find and Select WordPress

Once you’re in Softaculous, search for WordPress using the search box or browse to the “Blogs” section.

How to Install WordPress on Subdomain cPanel

Click on the WordPress icon to get started.

Start the Installation

On the WordPress installation page, you’ll need to choose a few options:

Choose Protocol: Pick HTTP or HTTPS, depending on whether your subdomain has an SSL certificate.

Choose Domain: Select the subdomain you created earlier, like blog.example.com.

In Directory: Leave this blank if you want WordPress installed in the main folder of your subdomain.

Configure WordPress

Now, fill in the details for your WordPress site:

Site Name: Enter a name for your site.

Site Description: Add a brief description.

Admin Account: Create a username, a strong password, and provide an email for your admin account.

admin account

Choose Language: Pick the language for your WordPress site.

Select Plugins: Optional plugins like Akismet and W3 Total Cache can be installed here.

Advanced Options: Softaculous will create a new database automatically, but you can customize the table prefix or enable auto-upgrades if you’d like.

Finalize the Installation

After entering all the details, click “Install.”

Softaculous will take care of the rest, and you’ll see a success message once everything’s done.

Verify the Installation

Finally, check that WordPress is installed by visiting your subdomain (like http://blog.example.com).

How to Install WordPress on Subdomain cPanel

If you see the default WordPress page, you’re all set!

Conclusion

So, we’ve walked through the whole process of how install WordPress on a subdomain using cPanel.

From grasping what subdomains are to solving common issues, you’ve learned everything you need.

We covered creating a subdomain, setting up a database, install WordPress in cPanel, and making crucial post-installation tweaks to keep your site safe and running smoothly.

By following these steps, you can easily handle your WordPress setup on a subdomain for anything from a blog to an online store.

Dive into WordPress’s many features, and always keep your site updated and secure.

Now that your WordPress site is live, you’re all set to share your content with the world.

Enjoy blogging!

Author

× WhatsApp us