• Dec
  • 11

PHP Speedy WP 0.5 - Now works with Wordpress 2.7

Following the release of Wordpress 2.7, we have a new version of PHP Speedy WP. Along with making it 2.7 compatible, I have added a new feature: CSS Background Images are automatically converted to data URIs. This is useful in reducing the amount of HTTP requests even further. And, importantly, it’s compatible with Internet Explorer, even though it doesn’t support data URIs. Don’t ask me how I did it. Magic.

Here’s the download link:
PHP Speedy WP 0.5

Please leave comments here: http://aciddrop.com/2008/12/15/php-speedy-wp-051-recommended-upgrade/


Related posts

Posted by admin in php
trackback
 

  • Dec
  • 11
bcarter

Has anyone actually used PHP Speedy with WP 2.7 yet. I’d like to hear from some users. Also, can PHP Speedy be used with WP Super Cache? One last thing… is there a site out there or plug-in that will help you evaluate whether or not my theme is 2.7 compatible?

  • Dec
  • 11
admin
Leon

I’ve been using it with 2.7, and David at http://www.artiss.co.uk/ has tried the new version at reported it working fine (the old 0.4.7 broke his WP2.7).

I have got it to work with WP Super Cache but it required some fiddling with WP 2.6, although I haven’t tried it with the latest version. See here for Super Cache info:
http://aciddrop.com/2008/03/22/php-speedy-wordpress-plugin-version-04/

As to your last question I have no idea I’m afraid.

  • Dec
  • 11
Kaspars

Leon, thank you so much fo the update. I was trying to fix it almost a month ago when switching to pre-2.7 trunk, but the changes in the core seemed to be too drastic. It would be interesting to hear what the necessary changes were.

  • Dec
  • 11
admin
Leon

Kaspars - the changes were related again to the JavaScript queuing engine which Wordpress changed once more for 2.7. If you have a look in the code I tagged with //WP 2.7 the changes that I made for that version so you can check.

  • Dec
  • 11
Malaiac

there is a bug left in compressor

CODE:
preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 96 in .../php_speedy_wp/libs/php_speedy/controller/compressor.php on line 1070

  • Dec
  • 12
Malaiac

mmm ... any way for other plugins to know if PHP Speedy is active ?
Some scripts (external) are called twice. Some scripts are not wp_registered but called from template, and need to know if PHP Speedy is running.

  • Dec
  • 12
dave
dave

argh! you need "comment notify!! ;)

at any rate, put into wp 2..6.5 (this version for up to 2.7) and it appeared to work fine except that:

1) wp post ratings ain't processing votes! are they too far down in order of calls???

2) it broke lightbox!

honestly, not a showstopper - not sure that lightbox makes sense for an image heavy site with lots of small pics (meaning mostly 300x300ish - then what - pop out of page into 'full size' which is the same but feels fancy?

just wanted to give you a headsup in case you hear this again - or if you want me to experiment with a fix, let me know, i'm on a small pre-launch site (email is in my comments)

  • Dec
  • 12
admin
Leon

Malaiac - interesting bug. Try putting a @ infront of preg_match_all for a quick fix. So line 1070 would read:
@preg_match_all("/".$regex."/is",$content,$elements); Not why what's causing it though - do you have any strange characters in your CSS background image filenames?

You could include the PHP Speedy config file
require($plugin_base . "/libs/php_speedy/config.php");
and check $compress_options['active'] to see if it's active.

Dave - comment notify?! Are you mad, that might encourage people to submit bugs!

Getting this to work with plugins can sometimes be tough. First, make sure you have the JS libraries they use ticked in the config section. Then install Firebug and see what the Javascript error being produced is. That will usually give you a clue as to what's gone wrong.

  • Dec
  • 12
dave
dave

sorry - added the "Ignore Rule" and this thing works perfectly with plugins like wpratings!!! thank you!

  • Dec
  • 13
Jason Grigsby

Even with .5 on 2.7, PHP Speedy isn't finding any javascript or css to work with on our installation. Any thoughts on this? It sounds like that was one of the issues with PHP Speedy 4.7 on the 2.7 betas.

Regarding @dave's comments on the rating plugin, it is because the rating plugin uses inline javascript then an external script. PHP Speedy inserts its combined external javascript at the top of the head tag.

What happens is that you get the external ratings javascript before you get the inline javascript. Unfortunately, the external javascript is written in a way that it references information coming from the inline javascript. When the external script comes before the inline script, javascript errors occur.

The simple solution is to ask PHP Speedy to ignore the ratings javascript as you did.

  • Dec
  • 14
Aouni

Hey, thanx for this plugins.

I am getting this error in the testing page, any clews?
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 16 bytes) in /home/aouniat/public_html/wp-content/plugins/php_speedy_wp/libs/php_speedy/libs/php/jsmin.php on line 144

I have 74 queries in my blog. I think most of them are made in the widgets. Will this plugin help me lower the number of queries?

Have a nice day,
aouni.

  • Dec
  • 15
paul bearne
paul bearne

does this work with WPMU?

  • Dec
  • 15
paul bearne
paul bearne

does allso work on Windows / xammp install

  • Dec
  • 15
IhateDesign

i tried in my blog and speeds up a lot, thanks!

  • Dec
  • 15
admin
Leon

Jason - I'm afraid the best I can suggest is to set up a test site, and try it on a base install. Then add themes/plugins and see what breaks it.

Aouni - jsmin uses quite a lot of memory. So either increase the amount of memory PHP can use (Google it), or turn off JS minification.

Paul - yes and yes.

IhateDesign - great!

Comments are closed