Revolution Slider Resource for Better Performance

Adjust your slider’s JavaScript settings to use the slider’s API for better revolution slider performance


Leverage Browser Caching showing only 5 Minute cache time issue

The reason for Leverage Browser Caching showing only 5 Minute cache time issue could be due to the fact that you are using Mod_Pagespeed module.

A little background: mod_pagespeed extends the cache lifetime of resources and adds a unique hash code to the resource name to improve user cacheability and thus speed up the page load for returning users.

As you’ve pointed out there are two distinct cache lifetimes that are important to mod_pagespeed.

(T.1) is the cache lifetime mod_pagespeed sets. It is currently set to 1 year and I don’t think it is customizable. But since we add in the unique hash code to the URL, you should not need to customize this in most cases. As soon as mod_pagespeed realizes that the resource has changed, it will put a different URL into the HTML file and thus update the user caches.

(T.2) is the original cache lifetime of the resource (by default 5 minutes). mod_pagespeed reloads the file whenever it expires, and thus you see that 3-4 minute lag. There are a couple different ways you can improve this. The best is if the files are completely static, you can use ModPagespeedLoadFromFile. When you use that directive, mod_pagespeed will check the file every time it rewrites HTML, meaning the resource will be updated instantly. If you cannot use LoadFromFile, you can explicitly set shorter cache lifetimes for your resources in Apache. For example:

<Directory ".../foo/">
  ExpiresByType image/gif "modification plus 3 minutes"
  ExpiresByType text/css  "modification plus 1 minute"
<Directory ".../bar/">
  ExpiresByType text/css "modification plus 5 minutes"

However, note that if you reduce this time, you will make mod_pagespeed request the resource more often (every 1 minute for CSS files in foo/ directory above) and can put more load on your server unnecessarily. Another solution is to clear mod_pagespeed cache during development. This can allow you to update the server quickly when developing, but not make your server unnecessarily burdened the rest of the time.

“If you want to modify the default cache time, you can do so with the following directive:

pagespeed ImplicitCacheTtlMs 2629746000;

The time is set in milliseconds. Those directives should be set in the “Advanced” settings for the domain you want to change it to.”

wordpress admin locked out after wordpress address and site address

If after changing site address and WordPress url address you get locked out of the WordPress login then all you need to do is:

  1. Go to phpMyAdmin
  2. Select your Database
  3. Search for Table wpgg_options
  4. Select and click the wpgg_options table
  5. Row under  “option_name” column  marked with a) siteurl b) home needs to be update with original url.
  6. Click edit and update the url
  7. Click Go to save.
  8. Repeat for home row as well.
  9. Done.
  10. redirection

WordPress Combine & Minify CSS using PHP

Using  PHP you can combine & minify all of your CSS files to reduces overall filesize and minimizes HTTP requests.

header('Content-type: text/css');

    function compress( $minify )
	/* remove comments */
    	$minify = preg_replace( '!/*[^*]**+([^/][^*]**+)*/!', '', $minify );

        /* remove tabs, spaces, newlines, etc. */
    	$minify = str_replace( array("rn", "r", "n", "t", '  ', '    ', '    '), '', $minify );

        return $minify;

    /* css files for combining */



Create a file with the code above and save it as minified.css.php, then simply link to that file as you would normally for your CSS file:
<link href="assets/css/minified.css.php" rel="stylesheet">

All the CSS files you reference inside the script will be combined & minified at run time.