Loading

SpeedUp WordPress: Optimize WordPress Website

Post Content
SpeedUp Wordpress 2018

How to Speed Up Your WordPress Website Easily – 2018

SpeedUp WordPress is the most thing which WordPress developers and users need.

Learn how to optimize your WordPress Website quickly.

At the beginning, visit Google PageSpeed Tool Insights to test your website speed.

SpeesUp WordPress

Follow the coming steps to speedUp WordPress:

First step to SpeedUp WordPress: Upload all of CSS and JavaScript files into your website server:

Before doing anything you need to link CSS and JavaScript files from your website localhost.
The reason of doing that is to avoid making any problems after optimization.

So, if you are linking an external file like (( Bootstrap library file )) for example its CSS file as shown below:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

Download the Bootstrap library and upload its required CSS and JS files into your WordPress theme, into the right folder. Then link them using (( wp_enqueue_script() and wp_enqueue_style() WordPress functions )) into your theme functions.php file. “You need to know how to do this, if you don’t, just comment on this post and I will reply you.”

Second step to SpeedUp WordPress: Minifying personal CSS and JavaScript files:

Use this CSS Compressor and JavaScript Compressor to minify your personal CSS and JavaScript files.

  1. Create a backup copy of your files.
  2. Open your personal CSS or JS file.
  3. Copy all the content code of the file.
  4. Open the link above.
  5. Paste the copied code into the text area into the link you opened.
  6. Click Compress button, and wait until the compressed code to be shown in the text area.
  7. Copy the compressed code.
  8. Back to your personal file.
  9. Replace all of its content code by the compressed code you copied.
  10. Save your file.
  11. Do this for all your personal CSS and JavaScript file.

Third step to SpeedUp WordPress: Removing the render-blocking JavaScript files – without plugins:

Take a look at the following image, see the optimization needed for JavaScript files:

remove render-blocking JavaScript files

All that you need to do this, is just adding the attribute (( defer=”async” )) to the code of linking the JavaScript file.

For WordPress just copy and paste the following code into your WordPress theme function.php file:

add_filter('clean_url',function( $url ){
     if(FALSE===strpos($url,'.js')){
          return $url;
     }
     return "$url' defer='async";
}, 11, 1 );

Save changes to the function.php file,  go to Google PageSpeed Tool again to test your website and see the message about removing the render-blocking JavaScript has gone. Also, you will see the increment of your website test score.

Fourth Step to SpeedUp WordPress: Using the trusted plugin (( WP Fastest Cache )):

WP Faster Cashe WordPress Plugin

You will use this plugin to make the following:

  • Using the WordPress FREE CDN for all your website image (( Optimizing all images into your website )).
  • Minifying your website HTML files content.
  • Gzip Compression – Reducing the size of the files sent from your server.
  • Using browser cashing to Reduce page load times for repeat visitors.

Follow the coming steps to do all of the above operations:

  1. Go to your website WordPress admin board to Install and activate WP Fastest Cache.
    WP Fastest Cache Install
  2. After installation process complete, active it clicking on the Active button which will appear instead of Install Now button.
  3. Go to the plugin Settings.
    WP Fastest Cache Settings menu
  4.  Under Settings tab, Check all the needed checkboxes as shown in the following image, then click submit:
    WP Fastest Cache General Settings
  5. Go to the CDN tab, click on the (( CDN by Photon )) button, and follow the coming steps:
    Wordpress CDN 1-2
    Wordpress CDN 3
    Wordpress CDN 4
    Wordpress CDN 5Then close the wizard.
  6. After doing the above steps you can clear your website cache.
  7. After cleaning cache go to Settings Tab and click submit again.

Now you can check your website speed and see the differences.

Note: If you have codes linked to external JavaScript files like (( Google analytic, Google Adsense, Social Media Plugins … etc )), you will see “Leverage browser caching” notification, I think you don’t need to optimize theme to get the perfect service from them.

Enjoy your website speed, If you have any problem, just post a comment here into this post and I will reply you immediately.

Write a comment

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hi, it’s a nice subject line which helped me a lot. could you please advise if the CDN is used by any other company except PHOTON OR MAXCDN?

You can use any CDN, but for wordpress you need to use PHOTON. It serves all images into your wordpress website.
I don’t suggest to use CDN for css files, because this doesn’t help in the Google PageSpeed Insights.
Into this post I asked to serve your personal CSS files into by your website localhost server, to can compin them into only one CSS File.