Make Money Online WORDPRESS Install WordPress in a subdirectory of an existing site – WordPress Sub-directory | WP Learning Lab

Install WordPress in a subdirectory of an existing site – WordPress Sub-directory | WP Learning Lab

Install WordPress in a subdirectory of an existing site – WordPress Sub-directory | WP Learning Lab post thumbnail image


WordPress is a content management system (CMS) that enables you to create a website or blog from scratch, or to improve an existing website. WordPress is free and open source software released under the GPL.

In this article, we will show you how to install WordPress in a subdirectory of an existing site.

First, you need to create a new directory in your site’s root directory. For example, if your site is example.com, you would create a new directory called wordpress.

Next, you need to download the latest version of WordPress from

Once you have downloaded WordPress, extract the files to the new directory you created.

Next, you need to create a new database for WordPress. To do this, log in to your cPanel account and click on the MySQL Databases icon.

Enter a name for the database and click on the Create Database button.

You will then be provided with a MySQL database username and password. Copy these values and paste them into the wp-config.php file in the new WordPress directory.

Next, you need to open the file in a text editor and change the following values:

define(‘DB_NAME’, ‘database_name’);

define(‘DB_USER’, ‘username’);

define(‘DB_PASSWORD’, ‘password’);

Save the file and close it.

Next, you need to open your site’s public_html directory in a web browser and navigate to the wordpress directory.

You will then be prompted to enter the database name, username, and password. Enter the values you copied from the wp-config.php file and click on the Install WordPress button.

WordPress will then be installed in the subdirectory of your site.

Related Post