WordPress 1.21 CSS Bug

As explained in someone else’s blog, there is a bug in WP1.21 that allows the site URL to be corrupted in the database, and then the formatting on your site goes poof. The fix is simple.

If you simply comment out two lines in wp-login.php, the bug is prevented.

// If someone has moved WordPress let’s try to detect it^M//if ( dirname(‘http://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) != get_settings(‘siteurl’) )^M// update_option(‘siteurl’, dirname(‘http://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’]) );^M

Also, you might want to fix the wp-options siteurl entry in the database.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s