Here’s a quick tip that will benefit your WordPress blog or website. When you install WordPress, all required JavaScript and code libraries are hosted on the local server that WordPress is installed on. In most cases, that’s ok. But if you want to speed up your sites, using Google Hosted JavaScript libraries can help.

You see, Google Hosted Libraries is a content distribution network (CDN) for most popular open-source JavaScript libraries. It contains JQuery and JQuery UI and many others that already come with WordPress. So, instead of pulling those libraries from your local server, why not use Google Hosted Libraries instead.

If you use Google Hosted Libraries, visitors to your sites will pull those scripts from Google’s servers instead of your local server, which in most cases faster than yours.


  • Use Google Hosted JavaScript Libraries in WordPress
  • Enjoy!

To get started, login to WordPress as administrator and go to Appearance –> Editor. Then select the function.php file for your theme to open. (Theme Functions)

When the file opens, copy and paste the content below into it and save. At the time of this post, the latest version of JQuery and JQuery UI were 1.8.2 & 1.8.23 respectively. You may have to change the version URL and # when new ones are added.

if( !is_admin()){
wp_register_script('jquery',  '', false, '1.8.2');

if( !is_admin()){
wp_register_script('jquery-ui', (""), false, '1.8.23');




Restart your webserver (apache) and test. Use .




Google Hosted Libraries can be found on this site