Here’s a step-by-step tutorial on how to add WordPress in a subdirectory or subdomain using cPanel:

 How to Add WordPress in a Subdirectory

1. **Log in to cPanel**:
– Open your web browser and go to your cPanel login page (usually `yourdomain.com/cpanel`).
– Enter your username and password, then click **Log In**.

2. **Create a Subdirectory**:
– In the cPanel dashboard, go to the **Files** section and click on **File Manager**.
– Navigate to the root directory (usually `public_html`).
– Click on **+ Folder** to create a new folder. Name it something relevant, like `blog` or `newsite`.

3. **Download WordPress**:
– Go to the [WordPress.org](https://wordpress.org/download/) website and download the latest version of WordPress.
– Extract the downloaded ZIP file on your computer.

4. **Upload WordPress Files**:
– In the **File Manager**, navigate to the new folder you created.
– Click on **Upload** and select the extracted WordPress files from your computer.
– Once uploaded, extract the files within the subdirectory.

5. **Create a Database**:
– In the cPanel dashboard, go to the **Databases** section and click on **MySQL Databases**.
– Create a new database and note down the database name.
– Create a new database user and assign a strong password. Note down the username and password.
– Add the user to the database and grant all privileges.

6. **Configure WordPress**:
– In the subdirectory, locate the `wp-config-sample.php` file and rename it to `wp-config.php`.
– Edit the `wp-config.php` file and enter your database details:
“`php
define(‘DB_NAME’, ‘your_database_name’);
define(‘DB_USER’, ‘your_database_user’);
define(‘DB_PASSWORD’, ‘your_database_password’);
define(‘DB_HOST’, ‘localhost’);
“`
– Save the changes.

7. **Run the WordPress Installation**:
– Open your web browser and go to `yourdomain.com/subdirectory` (replace `subdirectory` with the name of your folder).
– Follow the on-screen instructions to complete the WordPress installation.

How to Add WordPress in a Subdomain

1. **Log in to cPanel**:
– Open your web browser and go to your cPanel login page (usually `yourdomain.com/cpanel`).
– Enter your username and password, then click **Log In**.

2. **Create a Subdomain**:
– In the cPanel dashboard, go to the **Domains** section and click on **Subdomains**.
– Enter the name of your subdomain (e.g., `blog`) and select your main domain from the dropdown menu.
– Click **Create**.

3. **Install WordPress Using WP Toolkit**:

  • In the WP Toolkit interface, click the Install button.
  • In the Choose Installation URL section, select your newly created subdomain from the dropdown menu.

4. **Access Your WordPress Site**:
– Once the installation is complete, you can access your WordPress site by going to `subdomain.yourdomain.com`.

By following these steps, you can successfully add WordPress to a subdirectory or subdomain using cPanel. If you have any questions or need further assistance, feel free to ask!

Source: Conversation with Copilot, 8/12/2024
(1) How to Create a Subdomain and Install WordPress – Create Subdomain for Free in cPanel. https://www.youtube.com/watch?v=9l56Vh76ljk.
(2) How to Create a Subdomain on cPanel and Install WordPress in 2022. https://www.youtube.com/watch?v=uN3Aw7hMw7c.
(3) How to create subdomain in Cpanel and Install WordPress. https://www.youtube.com/watch?v=m4-zw_I3h7o.
(4) How to Install WordPress in a Subdirectory (Step by Step) – WPBeginner. https://www.wpbeginner.com/wp-tutorials/how-to-install-wordpress-in-a-subdirectory-step-by-step/.
(5) How to Install WordPress in a Subdirectory Using cPanel – HostAdvice. https://hostadvice.com/how-to/website-builders/wordpress/how-to-install-wordpress-in-a-subdirectory-using-cpanel/.
(6) How to Install WordPress in a Subdirectory (The Easiest Way) – WP Hive. https://wphive.com/tutorials/how-to-install-wordpress-in-a-subdirectory/.
(7) How to Install WordPress in a Subdirectory | InMotion Hosting. https://www.inmotionhosting.com/support/edu/wordpress/boldgrid-wp-subdirectory-install/.
(8) Installing WordPress within a Subdirectory – The 5 Step Process. https://www.vocso.com/blog/installing-wordpress-within-a-subdirectory/.
(9) undefined. https://bing.com/search?q=.
(10) undefined. http://example.com/newwebsite/%29.

BACK TO OUR:

<a style=”-webkit-border-radius: 28; -moz-border-radius: 28; border-radius: 28px; font-family: Arial; color: #ffffff; font-size: 20px; background: #000000; padding: 10px 20px 10px 20px; border: solid #ffffff 2px; text-decoration: none;” href=”https://orlandowebwizard.com/our-knowledgebase/” target=”_blank” rel=”noopener”>Knowledgebase</a>

Crafting Digital Excellence – Let’s Build Your Future!