Search Our Database
How to display your subfolder URL as main domain in wordpress
If you have installed WordPress in a subfolder and want your domain URL to display the main domain, you can follow the steps. 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.
2. Change the Site URL to your main domain URL.
3. If you have a Permalink configured from before, you may 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.
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