I need help to install WordPress on a subfolder of my existing website. I would like to add the blog as a subfolder to the site.
Hello
Vikas Deore,
You can operate multiple WordPress instances within the same domain or on a subdomain by WordPress installed on a sub-directory.
In order to install and run WordPress on the sub-directory, you can follow the steps given below,
- First, create a Sub-Directory Inside Your WordPress Installation
- Now, you can connect your existing WordPress installation using cPanel File Manager or FTP.
- Nextly, once connected, create a sub-directory.
- Now, upload the WordPress zip into that sub-directory, then unzip and extract it.
- Then, add the WordPress database details in wp-config.php.
- Nextly, Install WordPress on the installation page.
- Lastly, Access the WordPress admin installed within the sub-directory page.
If a separate WordPress is installed at the root directory, we will need to put the code in the
.htaccess file of your sub-directory.
- You will have to paste the following code into the .htaccess file of your subdirectory,
Code:
# BEGIN WordPress
RewriteEngine On
RewriteBase /subdirectory/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.php [L]
# END WordPress
Note: You will need to replace the
/subdirectory with your
sub-directory name.
Thus, you can install WordPress on a separate sub-directory by implementing the above steps.
Now, your subdirectory is a brand new WordPress instance that you can benefit from. Also, you can add the blog as a subfolder to the site.
-----------------------------
Regards,
Rex M