WordPress: You Changed the Site Address URL and now Blog Posts are Blank!

no alt text set

So you installed WordPress in a sub-directory because you want your URL to still be simple, such as installed here www.mydomain.com/wordpress-installed-here/ yet visitors will see www.mydomain.com when navigating your site, but after doing so your blog posts and pages show up as a white blank page. Not good.

Luckily, there’s a simple fix! Just update your .htaccess file in the main directory of where your site is located. I’ve put example code for the .htaccess file so you’ll know what to change:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com$
RewriteCond %{REQUEST_URI} !^/wordpress-installed-here/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress-installed-here/$1
RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com$
RewriteRule ^(/)?$ wordpress-installed-here/index.php [L]

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . wordpress-installed-here/index.php [L]
# END WordPress

The bottom most RewriteRule between the #Begin WordPress and #End WordPress is crucial. If you don’t change that, your home page will look fine, but any posts or pages will result in the white blank page.

Check it out, you’re done. Please feel free to comment below or send me a Tweet at @CaptMacSparrow, if you run into any issues.

Cheers.

(Visited 57 times, 1 visits today)

If you found this post useful ...

Buy Me a Coffee logo
Wondering why you keep seeing lower-cased 'i' in my posts? Read -> Why ‘i’ is not capitalized
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x