Need help? Contact Me

 

I’ve had several clients recently have their WordPress website homepage show a temporary coming soon page or under construction. These are sites that are hosted on GoDaddy and have the main domain pointing to a sub folder. Basically, just the homepage (domain name) is not pointing to the sub folder. My clients are using an htaccess file in the main root folder to point the domain over to the desired folder with the WordPress files. However, recently just the homepage stopped pointing and I believe it has to do with some outdated software that GoDaddy is using for their shared hosting accounts. This approach is only if you want to hide the subfolder from your website urls.

Here is the solution to fix this:

Step 1. Place the following into your ROOT FOLDER htaccess file, replace domain and subfolder with your own.
If you already have this, skip to step 2.

[pullquote]RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteRule ^(/)?$ subfolder/ [L][/pullquote]

Step 2. Copy (do not move) the index.php file from the WordPress FOLDER to the ROOT FOLDER.

Step 3. Change the following at the end of the ROOT index.php file to include your subfolder.

[pullquote]/** Loads the WordPress Environment and Template */
require(‘./subfolder/wp-blog-header.php’);[/pullquote]

WordPress does provide a similar approach here, however it did not seem to work on these GoDaddy sites.

You do not need to make any changes to the General Settings site urls in WordPress with the instructions I provided.