How to Hide that WordPress is in a Subfolder

Our Easy Apps collection installs WordPress to a subfolder or maybe you installed your WordPress to a subfolder for testing or another function. However, you have decided that you want your visitors to be able to view their domain and see the WordPress installation first. That can easily be set that up without having to move all the files and modifying the database. Just follow the steps below:

  • First simply copy (not move) the index.php file from the WordPress install to the root of the domain.
  • Now edit the new index.php file and add the sub folder in front of the call for the WordPress header. The last few lines of the file should now look like this:
/** Loads the WordPress Environment and Template */
require('./subfolder/wp-blog-header.php');
?>
  • To ensure that this new index file is being read by default please make sure to rename any index.html file that might be in the root of the domain. Now you can go to your domain to test the change.

It is important to note that after this change you will still need to visit the full url path to go to your Dashboard. For Example:

domain.com/subfolder/wp-admin

 

Was this article helpful?

Yes (20)
No (2)

We're sorry you didn't find this article very helpful. Please help us improve it by leaving your feedback below.

Error