h1

PHP Speedy

March 22, 2008

PHP Speedy

PHP Speedy is a script that you can install on your web server to automatically speed up the download time of your web pages. Here’s an example, from a test page:

Before PHP Speedy – 14 requests that took 4.44 seconds

Before PHP Speedy

After PHP Speedy – 4 requests that took 1.1 seconds

Before PHP Speedy

PHP Speedy automatically joined together all the appropriate files and compressed them, greatly reducing the load time of the page. Let’s see what Yahoo’s Y-Slow makes of this:

Before PHP Speedy – Grade F (44)

Before PHP Speedy with YSlow

After PHP Speedy – Grade A (96)

Before PHP Speedy with YSlow

Don’t take my word for it

You can have a look at the test page for yourself:

Download

You can download PHP Speedy from this link: PHP Speedy 0.4.6 download

Installation – via auto-install

In order to install PHP Speedy you should:

  • Download and unzip the PHP Speedy package into its own directory
  • Point your browser to the PHP Speedy directory
  • Follow the installation instructions

Installation – manual

If you prefer to manually install things:

  • Download and unzip the PHP Speedy package into its own directory
  • Delete the index.php and install.php files
  • Open config.php
  • Fill in the blanks for the variables (apart from username and password). You might enter something like this:
    $compress_options[’document_root’] = “/home/my_site/public_html”;
    $compress_options[’javascript_cachedir’] = “/home/my_site/public_html/aciddrop/php_speedy/”;
    $compress_options[’css_cachedir’] = “/home/my_site/public_html/aciddrop/php_speedy/”;
    $compress_options[’minify’][’javascript’] = “1″;
    etc
  • Make sure the directories you specified for the cachedirs are writable
  • For the GZIP, minify and expires options 1 is on and 0 is off
  • Open the php file that controls the output of HTML that you will be compressing. This might be something like index.php. Include the php_speedy.php file at the very top, i.e like this:
    require(’/home/my_site/public_html/aciddrop/php_speedy/php_speedy.php’);
  • Add this code at the very bottom $compressor->finish();
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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

%d bloggers like this: