Simon Davies Digital ltd

WP-Admin broken after updating WordPress

Posted by & filed under MAMP, WordPress.

Have you just updated your local of WordPress and its now all broken on MAMP, I’ve had this problem a few times now so thought it would be worth sharing how to fix this. The problem is caused by the load-scripts.php file being compressed with zlib, I first did as suggested on this stackoverflow question. But this still didn’t fix the problem after some looking around I noticed that MAMP zlib compression was turned off, when I turned this on WordPress worked fine. I’m not sure why this would fix it as zlib will only send compressed data if the browser lets apache know through the headers. I have a feeling this could be a bug with Chrome, or Mamp sending compressed data when the browser is not expecting it.

To fix this problem you will need to open /Applications/MAMP/conf/php5.4.4/php.ini in your text editor of choice, then search for zlib and you should find the line below.

zlib.output_compression = Off

You just need to change this line to

zlib.output_compression = On

Then just restart apache with apachectl restart and hopefully everything should be working again for you.

NOTE: After taking these steps I installed a new copy of WordPress and had the problem again, after restarting apache again the problem went away.