Shoot. You just upgraded your WordPress installation to the latest version (3.1 for me) and all of a sudden, everything is broken on the front end. You’re not on a Linux server, you’re on an IIS server and you already knew WordPress MIGHT have some incompatibilities, but haven’t see any yet.
If you’re like me and you’ve Googled your heart and and tried so many solutions and nothing works… maybe this post is for you.
Have you tried?
- To reupdate to the newest version by browsing to http://{mysite}/wp-admin/upgrade.php and see “No update required”.
- Changing your permalinks to just the default and temporarily rename your HTACCESS to see if you can pull a page.
- Downloading the WordPress 3.1 ZIP for IISÂ http://wordpress.org/wordpress-3.1.zip and reuploading the “wp-admin, wp-includes, and all the root WordPress files (with the exception of wp-config.php, .htaccess, etc)” http://codex.wordpress.org/Upgrading_WordPress_Extended.
- Deactivating all your WordPress plugins, trying the site again, reactivating them, deleting them, etc.
- Played around with your “Site URL” in the WordPress settings.
- Reinstalling WordPress from scratch with a fresh brand new database and files.
AND NOT A SINGLE ONE OF THESE SOLUTIONS WORKED, AND YOUR FRONT END STILL IS A BLANK WHITE PAGE?
My Solution
- Open “/index.php”
- Replace
require('./wp-blog-header.php');with
/** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); require_once(ABSPATH . 'wp-blog-header.php'); - That’s it.
Looks like IIS had a bit of trouble requiring the file using a path relative to the site root. Hopefully this solution works for you.
http://wordpress.org/wordpress-3.1.zip
.htaccess is an apache file and IIS doesn’t use it.
That is correct. However, if you tinker with it enough, you can make your blogs pages fail to load. An example would be… I had changed the base rewrite paths in the HTACCESS file just for the heck of it, and the site failed to load even on an IIS server. While it has little to no significance for most IIS server, some do react to it. Such as when Helicon ISAPI_Rewrite is installed.
[...] WordPress 3.1 Upgrade – Frontend Blank Site, Backend Okay (IIS) ??? TLS Web Solutions [...]
@Slamlander : IIS 7.x now uses .htaccess (win2008/win7 onwards)… so yes it does matter
Hi –
I’m sorry if this is a rookie question, but how exactly am I defining the absolute path?
is this what I’m trying to do?
define(‘ABSPATH’, ‘www.mysite.com/wordpress/’);
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
require_once(ABSPATH . ‘wp-blog-header.php’);
Becca,
How the statement works is executed as following:
1. Does the word “ABSPATH” have a value or has the PHP defined it?
2. If not, then define it now. Define it (give it a value of) “dirname(__FILE__) . ‘/’).
3. dirname(__FILE__) . ‘/’ means “Start from the root of my server’s absolute path and drill down all the way until you find me. Remember that path, and strip myname from the path, so it only shows the directory structure. Then, add a forward slash to the end of it.”
4. Now, required wp-blog-header.php with the absolute path prefixed. This way, it finds the WordPress directory and files successfully.
if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); require_once(ABSPATH . 'wp-blog-header.php');You’re a lifesaver—migrating an enterprise-level WordPress install to an IIS 6 server was giving me a headache, and then I found this post. After hours of Googling, like you said.
And of course, after the change, everything just instantly worked. So thanks!
Thanks a million! Was worried for a moment transferring a site to a windows server with a lousy cpanel was giving some headaches. Nice to have some relief