Search our database

How to display your subfolder URL as main domain in wordpress

If you have installed WordPress in subfolder and want your domain URL to display main domain, you can follow the steps below. In this example, our domain is testing.com.my and we have installed WordPress in testing.com.my/v2.
The end result will be URL show www.testing.com.my and displaying content of v2
Note: This example was using a fresh installation of wordpress in subfolder

1. Login to your WordPress admin and go to General tab under Settings. 1

2. Change the Site URL to your main domain URL. 2.1

3. If you have Permalink configured before, you might want to change it as well.

4. Copy the index.php and .htaccess in subfolder v2 to main folder such as www or public_html.
If you do not have Permalink, your v2 folder might not have .htaccess

5. Edit the index.php in your public_html. You may view the image for better understanding. Save it after done. 4

6. Refresh your website now, you should be to view the main URL displaying content of your subfolder

For detailed steps, please refer to WordPress Guide

Tags: , , , ,