adplus-dvertising

HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps

In this tutorial we will be discussing how to install WordPress in a subdirectory in cPanel. We will be installing WordPress in cPanel in four easy basic steps. Which are:

In this tutorial we will be discussing how to install WordPress in a subdirectory in cPanel. We will be installing WordPress in cPanel in four easy basic steps. Which are:

  1. Create Database
  2. Upload WordPress
  3. Edit WPConfig file
  4. Install WordPress

How to install WordPress in a subdirectory: The basic steps

Am going to assume that you already have a domain name and have paid for hosting as well. I also assume that you already have your cPanel login details with you and your internet browser is opened down.

STEP 1: HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY

Create Database

  • To execute the first step on how to install WordPress in a subdirectory in cPanel, login in to your cPanel with your cPanel user name and password by typing for example, “https://yourdomainname.com/cPanel as shown in the image below:
How to install WordPress in a subdirectory
  • You should see a screen like the one shown below- your cPanel dashboard
CPANEL DASHBOARD
  • Scroll down and search for MySQL Database. Click on it. See image below.
SQL DATABASE
  • Now you will be directed to “Create New Database” window
CREATE NEW DATABASE
  1. As shown in “1” in the image above, enter the name you want to use for your new database. For example, you can type in “wordpresstutorial”
  2. Click “Create Database”
  • After you click on “Create Database” you will be taken to the window below. Click on “Go Back”
MYSQL DATABASES
  • Now copy the database “educraftworld_wordpresstutorial” to a safe place. You can open notepad on your computer and paste it there. You will be needing it later on. Click on go back.
  • Next, you need to add a username and password for the database.
  • Simply scroll down to the ‘MySQL Users’ section and provide a new username and password. Click on ‘Create User’ button when you are done to continue. See image below:
  • Enter username
  • Enter password
  • Enter same password
  • Click on “Create User”
ADD USER TO DATABASE
  • Make sure your username and password are saved in the notepad opened previously.
  • You should see the window shown on the image below. Click on “Go Back”
MY SQL DATABASES
  • The next thing you need to do is grant your newly created user privileges to work on the database you created earlier.
  • Now scroll down to ‘Add user to database’ section.
  • Select your MySQL username and then select your newly created database from the drop down list and click on “Add”, as shown in the image below:
ADD USER TO DATABASE
  • Once you click on “Add”, you will be taken to the “Manage User Privileges” window. Check “All Privileges”. See image below for more explanation.
MANAGE USER PRIVILEDGES
  • Click on “Make Changes” as shown below:
SEO & WordPress Blog- LEARN SEO | LEARN WORDPRESS
  • cPanel will now grant the MySQL user full privileges on your newly created database.
  • NOTE: A successful message will be displayed to confirm you have granted the privileges.
  • That’s the end of STEP 1. Now lets move to STEP 2.

STEP 2: HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY

Upload WordPress

  • To execute the second step on how to install WordPress in a subdirectory in cPanel, on your internet browser search bar, type “wordpress.org” and press the enter button. You should have a window like the one shown below:
WORDPRESS
  • Scroll down. Under Get Started with WordPress, click on “Get WordPress” to download WordPress.
  • You might be directed to another window like the one below, just click on “download and install”
GET WORDPRESS
  • Now you will be directed to WordPress main download page as shown below, click on “Download WordPress 5.7.2”. Save and download WordPress to your download folder on your computer . This should be in a Zip file.
WORDPRESS WINDOW
  • Go back to your cPanel and search for File Manager. Click on File Manager.
CPANEL FILE MANAGER
  • You will be directed to the File Manager Window as shown below. Click on public_html
CPANEL WINDOWS
  • Click on folder and type in your sub-directory name as the name of the folder.
SEO & WordPress Blog- LEARN SEO | LEARN WORDPRESS
  • Type in the name of the sub-directory as shown below. In this example am using “wordpress-tutorial”. Make sure you do not name the folder something that is already in use. The folder name is also what your visitors will type into the URL to find it, so make sure it is appropriately named.
  • Click on the sub-directory that you just created. In this case we created “wordpress-tutorial”. See image below:
WORDPRESS TUTORIAL
  • At this stage your sub-directory should be empty. Click on upload.
SEO & WordPress Blog- LEARN SEO | LEARN WORDPRESS
  • You should have a screen as shown in the image below. Click on “Select File” to Upload your downloaded WordPress zip file. Remember the WordPress zip file you downloaded in Stage 2.
WORDPRESS FILE UPLOAD
  • Wait for it to upload. Once it reaches 100% it shows the size of the WordPress zip file and “complete”. Click on “Go back to “/home2/………”
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps 6
  • Wait for it to load. Now you should see a screen like the one below:
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps 7
  • Now right click on the WordPress zip file and click on extract. In the windows that show (see sample image below), click “Extract Here”.
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps 7
  • Wait a few seconds and you will see a window like the one below. Click on close.
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps 8
  • Your screen should look like the one below. Now you have two WordPress files
    • Extracted WordPress file
    • Zipped WordPress
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps EXTRACTED ZIPPED FILE
  • Now, double click to open the “Extracted WordPress” file and click on “Move” to move all the files in it as shown in the image below to your main subdirectory.
SEO & WordPress Blog- LEARN SEO | LEARN WORDPRESS
  • Once you click on “Move”, you should see the window below.  In the box, delete “/wordpress” in the link. This is to make sure you are moving the files to the right WordPress Subdirectory, in this case “/wordpress-tutorial”
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps 99
  • Once you’ve done the above, you should see the link as shown in the image below. Click on “Move File(s).
SEO & WordPress Blog- LEARN SEO | LEARN WORDPRESS
  • Wait few seconds for the move to reflect. Now select both the WordPress folder and the WordPress zip files. Check the “Skip the trash and permanently delete files” and click on confirm.
SEO & WordPress Blog- LEARN SEO | LEARN WORDPRESS
  • This stage leads us to STEP 3.

STEP 3: HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY

Edit WPConfig File

To execute the third step on how to install WordPress in a subdirectory in cPanel, we need to edit the WP-Config-sample.php file

  • To edit this file, right click on it and click on rename it.
SEO & WordPress Blog- LEARN SEO | LEARN WORDPRESS
  • Change “wp-config-sample.php” to “wp-config.php” and click on rename.
WORDPRESS TUTORIAL
  • Now right-click on the “wp-config.php” and click on Edit. On the window that appears (see sample image below), click on Edit again as shown below:
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps 11
  • The window below will show up at this stage. Now it’s time to
    • Replace “Database Name” with the one you created in STAGE 1
    • Replace “User Name” with the one you created in STAGE 1
    • Replace “Password” with the one you created in STAGE 1
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps DATABASE NAME HERE
  • Now click on save changes at the upper right part of the screen. Then click “Close”
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps SAVE CHANGES
  • This takes us to STEP 4, which is the final step.

STEP 4: HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY

Install WordPress

  • To execute the fourth step on how to install WordPress in a subdirectory in cPanel, we need to install and activate WordPress in the subdirectory we created. To do that, open your internet browser, and type in https://yourwebsite/yoursubdomain . Hit the enter button on your keyboard. For example https://educraftworld.com.ng/wordpress-tutorial
  • On the screen that shows up, choose the language with which you want to install WordPress and click “Continue”
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps IN ENGLISH LANGUAGE
  • Now fill in the details for logging into your WordPress dashboard
    • Site Title: Enter the title you want to give your site
    • Username: Enter the username for your site
    • Password: Enter the password for your site
    • Your Email: Enter the default email to log into your WordPress site
    • Search Engine Visibility: Check to discourage search engine from indexing your site or leave it as it is.
    • Finally click on Install WordPress to complete the installation
HOW TO INSTALL WORDPRESS IN A SUBDIRECTORY : 4 Easy Steps - CHANGE PASSWORD

The Conclusion

That’s it, the most basic simple four steps on how to install WordPress in a subdirectory. Do you like this post, do share with your friends and colleagues. Someone out there may need the information in this post. Also, if you have any question about the installation, please hit me up in the comment section.

Default image
Omoregie Johnson
Johnson Omoregie is an SEO specialist/Website Developer/ SEO Copywriter/Content Developer. He eats and sleeps Search Engine Optimization (SEO)/Digital Marketing. And help business generate leads and conversions through Organic Traffic. He is the author of Business Profit Blueprint: Million Dollar Tips To Promote Your Business And Increase Profit. https://about.me/omoregie.johnson
Articles: 95

Newsletter Updates

Enter your email address below to subscribe to our newsletter

Leave a Reply