Installing Free Lets Encrypt SSL Certificate on DigitalOcean | Serverpilot

Gone are the days when we had to pay hundreds of dollar for SSL certificates. Let’s Encrypt is a service that now provides SSL certificates for free. Installing SSL certificate have many advantages like your site visitors data are safe and as we know as of 2017 most of the modern browsers have started showing green secures labels in its user interface for SSL enabled sites, some webmaster also suggests that SSL certificates are good for SEO.

Check out some of our blog posts related to DigitalOcean:

DigitalOcean is not managed hosting provider which means that you will have to do most of the set-up on your own. Installing SSL certificate on DigitalOcean is really a very tedious task. Today we are going to tell you the easiest way of installing SSL certificates on your DigitalOcean server.

Installing SSL Certificate through Nginx

For this tutorial you need to make sure that your DigitalOcean server is setup using Serverpilot and is running on Ubuntu OS and Nginx server. To check whether your site is running on Nginx run the following command.

sudo nginx-sp -v

If above code returns something like nginx version: nginx/1.13.10 then congratulations as you’re running Nginx server.

  • Step 1: Login as root to your DigitalOcean droplet through SSH. If you don’t know how to do it then check out this tutorial.
  • Step 2: Run following command to download and install Lets Encrypt.

sudo git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

  • Step 3: Let’s stop Nginx server for a moment:

sudo service nginx-sp stop

  • Step 4: Obtain SSL certificate by running following command:

sudo ./letsencrypt-auto certonly --standalone -d yourdomain.com -d www.yourdomain.com

  • After obtaining the certificate you’ll get a success message like in following screenshot:

  • Step 5: Start the Nginx server by running this command:

sudo service nginx-sp start

  • Step 6: Now we are going to make some changes to Nginx configuration file. Please make sure you follow this step carefully. Run following command to switch to directory where Serverpilot keeps Nginx Configurations.

cd /etc/nginx-sp/vhosts.d

  • Now press ls and hit enter to list all the configuration files which are there in your directory. Serverpilot creates .conf file for each app your create, for example if your serverpilot app name is howlthemes then your conf file should look like: howlthemes.conf

  • To find your serverpilot app name, login to serverpilot and then click on app from left sidebar and you will be listed with app that exists on your account.

  • Step 7: After knowing App Name run following command:

sudo nano yourappname.ssl.conf

  • Step 8: Now paste following code inside it by using right click:
server {
	listen 443 ssl http2;
	listen [::]:443 ssl http2;
	server_name  howlthemes.com www.howlthemes.com;


	ssl on;

	# letsencrypt certificates
	ssl_certificate      /etc/letsencrypt/live/howlthemes.com/fullchain.pem;
	ssl_certificate_key  /etc/letsencrypt/live/howlthemes.com/privkey.pem;

        #SSL Optimization
	ssl_session_timeout 1d;
	ssl_session_cache shared:SSL:20m;
	ssl_session_tickets off;

        # modern configuration
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;

        ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK'; 

        # OCSP stapling 
        ssl_stapling on; 
        ssl_stapling_verify on; 

        # verify chain of trust of OCSP response 
        ssl_trusted_certificate /etc/letsencrypt/live/howlthemes.com/chain.pem;
        #root directory and logfiles 
        root /srv/users/serverpilot/apps/yourappnamehere/public; 

        access_log /srv/users/serverpilot/log/yourappnamehere/yourappnamehere_nginx.access.log main; 
        error_log /srv/users/serverpilot/log/yourappnamehere/yourappnamehere_nginx.error.log; 

        #proxyset 
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-SSL on; 
        proxy_set_header X-Forwarded-Proto $scheme; 

        #includes 
        include /etc/nginx-sp/vhosts.d/yourappnamehere.d/*.nonssl_conf; 
        include /etc/nginx-sp/vhosts.d/yourappnamehere.d/*.conf; 
} 
  • In above code replace howlthemes.com with your domain name and yourappnamehere with your serverpilot app’s name. Finally save it by ctrl+o and exit using ctrl+x.
  • Step 9: Restart Nginx and you’re done.
sudo service nginx-sp restart
  • If you’re able to preview your site with https:// then congrats you’ve successfully configured SSL Certificate. If you’r website is down then you might have done something wrong. If you get following error while restarting Nginx server then there is something wrong with your ssl.conf file.

Job for nginx-sp.service failed because the control process exited with error code. See “systemctl status nginx-sp.service” and “journalctl -xe” for details.

To get rid of above error remove yourappname.ssl.conf file by following following steps:

  1. Go to configuration directory: cd /etc/nginx-sp/vhosts.d
  2. Then remove your .ssl.conf file: rm yourappname.ssl.conf
  3. Restart Nginx: sudo service nginx-sp restart

Redirecting HTTP to HTTPS using .htaccess

Add following code in your .htaccess file:

RewriteCond %{HTTP:X-Forwarded-Proto} !=https
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=302,L]

Bonus for WordPress Users

Install and Activate Really Simple SSL plugin which will do everything like redirecting http to https etc automatically if your SSL is installed successfully.

Image Optimization Tricks To Speed Up WordPress Site

Images & other multimedia plays crucial role in loading time of a website. High quality bulky images are the largest contributors to Web page size, degrading page speed and agitating visitors eagerly waiting for the web page to load. The following are image optimization best-practices go a long way in reducing negative impact of images on website speed:

Reduce Image Size Without Reducing Quality

Modern websites have multiple large images in slider, they increase loading time because each image is at least more than 1Mb large. There are many online tools and plugins which can reduce image size without altering a single pixel.

Optimizilla (Web Interface)

Best tool available online for reducing image size, all you have to do is upload the image and it automatically optimize it for you, after optimization it also provides you with slider using which you can reduce or increase quality of image and compare side by side. Best thing about this tool is that its absolutely free with no limits.

Link: http://optimizilla.com

Imagify WordPress Plugin

If you don’t want to optimize each image manually then just install Imagify plugin from here. After installing the plugin follow below steps:

  • Click on Sign up button, a pop out will appear on your screen, here enter your email address.

Imagify Setup

  • Now check your mail you will receive API key from Imagify server, give that API key to Imagify plugin.

Imagify API Key

  • Finally you have setup Imagify plugin, now go to settings page & click on bulk optimizer button and then Imagif’em all.

Bulk Image Optimization

Lazy Load WordPress Image

Lazy Load is a technique used by websites to delay the loading of actual images for the complete loading of the website. In simple words the images are fetched when the user wants to see them.

Plugin #1 Lazy Load

This is most popular and most easy to use lazy load plugin available. All you have to do is install and activate this plugin and it will automatically start lazy loading all of your images.

Link: https://wordpress.org/plugins/lazy-load

Plugin #2 BJ Lazy Load

Unlike above plugin this one give you many configuration options, using which you can customize your lazy loading setup. It offers support for images, thumbnails, iframes (including video embeds from YouTube or other sites), Gravatar images, Text widgets and much more.

Link: https://wordpress.org/plugins/bj-lazy-load

To change settings of this plugin, go to SettingsBJ Lazy Load:

BJ Lazy Load Option

Easiest way of Installing WordPress on DigitalOcean

DigitalOcean is second largest hosting provider in world, their hosting are affordable. They provide SSD Cloud hosting and give you full control over it, like other mainstream hosting provider for WordPress they don’t provide cPanel so it make it quite difficult for non technical users to install WordPress on it. In this tutorial I will teach you how you can create scalable WordPress website using digital ocean in minutes.

Things you’ll need:

  • DigitalOcean Account with at least $5 credit.
  • ServerPilot Free Account.
  • PuTTY (Not Necessary)

Step 1– Create DigitalOcean Account (skip if you already have one)

  • Go to this link and register for an account. This link will give you extra $10 credit.
  • Confirm your email.
  • Update your Billing information.

Step 2– Create a Droplet

  • Login to your DigitalOcean account and click on Create Droplet button on top right corner.

Choose an image

Select Ubuntu in Distributions.

DigitalOcean Droplet

Choose a size

Select whatever size suits you, even $5 droplet scales pretty well for WordPress blog with around 100k page views per month.

DigitalOcean Droplet Price

Choose a datacenter region

Select whatever region you get most traffic from. You should choose a server region closer to your target audience.

DigitalOcean Droplet Region

Choose a hostname

Select a droplet name that is easily identifiable. I use a droplet name that is similar to the domain name. You can follow the same policy.

DigitalOcean Droplet Name

  • Finally Click on Create Button.

Step 3– Login to newly created DigitalOcean Droplet

Right after creating a new droplet on DigitalOcean, check for mail by DigitalOcean where they have provided you with following three things:

  • IP of droplet
  • Username (which is root most of the time)
  • Password

DigitalOcean Email

Access Console

  • In your DigitalOcean account, click on newly created droplet and access console.

DigitalOcean Droplet

  • If you see a black screen just click on it and press any key to activate the console window.
  • If it asks for login then type root and hit enter.

DigitalOcean Console

  • Now it will ask for password, enter the password you received in email by DigitalOcean after creating droplet.
  • Since you’re login for first time, you’ll be asked to change your password.
  • Remember when you type password it will not show anything on terminal for security reason so just don’t panic.
  • After you changing password you’ll be successfully logged in to your Droplet. Now you can close the console and follow next step.

Alternative way to log in to your droplet using PuTTY

Step 4– Add domain to DigitalOcean

Check out this article!

Step 5– Create ServerPilot Account

Go to serverpilot.io and register for a free or premium account.

Step 6– Connect ServerPilot & DigitalOcean

  • Login to your serverpilot account and click on “Connect a Server” button.
  • Now enter your droplet IP address which you recieved in email from DigitalOcean.
  • In Root Password field enter the password which you’ve set in step 3.
  • In SFTP Password field enter the *new* password.
  • Finally click on Connect button and wait.

ServerPilot DigitalOcean

Step 7– Installing WordPress

After connecting your DigitalOcean droplet with ServerPilot we’re going to install WordPress on DigitalOcean Droplet through ServerPilot.

  • Click on +Create App button.
  • Enter name, domain and tick WordPress.
  • After ticking WordPress, enter Title, Username, Password and Email for your WordPress blog.
  • Click on Create App and wait for serverpilot to install WordPress for you.

serverpilot install wordpress

Final Step– Login to your WordPress site

Congratulations! You’ve installed WordPress on your DigitalOcean Droplet.

If you’ve followed step 4 and added domain to your DigitalOcean Droplet then enter that domain name to access your WordPress site.

If you didn’t added domain to your DigitalOcean Droplet then simply enter the IP of your droplet to access your WordPress site.

Login to your WordPress using wp-admin: yourdomain.com/wp-admin

Feel free to ask any questions by commenting below.

Login to DigitalOcean Droplet using PuTTY [Easiest Method]

DigitalOcean is not managed hosting provider, you have to do everything on your own, if you had use any shared hosting previously that you may have seen that they provide build in FTP option on their cPanel for you to manage files in your server but DigitalOcean don’t provide that option for it’s droplet but by using terminal we can easily access files in our droplet.

Login to your DigitalOcean Droplet

Right after creating a new droplet on DigitalOcean, check for mail by DigitalOcean where they have provided you with following three things:

  • IP of droplet
  • Username (which is root most of the time)
  • Password

DigitalOcean Email

  • Now download PuTTY for windows from this link.
  • Open PuTTY.exe and put your droplet IP Address in host name input box and click Open.

PuTTY

  • Popup will appear giving you some warning, just click yes.

PuTTY

  • Now a terminal will open asking you for username, type your username which is root.

PUTTY

  • Now enter password for your droplet. Remember when you type password it will not show anything on terminal for security reason so just don’t panic and if you want to paste password then right click and enter.

PuTTY Digitalocean

  • Congratulations! You are logged in. If it’s your first login since creating droplet then it will ask you to change password for security reason.

Login to DigitalOcean Droplet through ServerPilot

If you’ve configure your droplet using serverpilot (which we recommend) then best way to login to your droplet is by using serverpilot username instead for root username.

  • Open PuTTY.
  • Enter IP address of your droplet.
  • when terminal will ask for username this time enter ‘serverpilot‘.
  • now enter password for serverpilot user which you have set while configuration.
  • And you’re logged in :D

ServerPilot PuTTY

If you face any problem then feel free to comment below.

How To Point A Domain Name At DigitalOcean Droplet

After creating a droplet or server with DigitalOcean you may want to assign it a domain name, below is detailed guide on how to point your domain name to digitalocean droplet.

Things You Need

  1. Droplet on DigitalOcean
  2. A Domain Name.
  3. IP Address of your droplet.

Step 1: Setting up Nameserver

For this tutorial I’m using namecheap, you may have bought domain from some other provider but don’t worry check out this article on how to add nameserver, DigitalOcean has covered almost all domain name provider.

  • Login to your domain name provider account.
  • Now click on manage domain and select the domain you want to point to DigitalOcean droplet.
  • Now search for an option called DNS (Domain Name Server) or just NameServer.
  • Select custom DNS and add following three Nameserver to field.

ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

nameserver list digitalocean

Step 2: Pointing Droplet IP to domain name

  • Now login to your DigitalOcean account
  • Select Networking from navigation menu
  • Now in Domain tab you will see an option to add a domain
  • Enter your domain name and droplet IP in input box and click on Create Record button.

Add a Domain DigitalOcean

  • Now your Domain name setting should look something like following image.

DigitalOcean

In above image I’ve added extra CNAME field with text www which is pointing to howlthemes.com, I did this because I wanted my howlthemes.com to redirect to www.howlthemes. So in simple words I redirected non-www URLs to www.

If you face any problem then feel free to comment below.

Step by step guide to setup Yoast Seo WordPress plugin

At howlthemes.com we recommend all our users to use Yoast SEO and we our self use it for our website. This plugin for WordPress allows you to add meta tags, generate sitemap, create breadcrumbs, focus on keyword, nofollow post or page, create custom permalinks and add facebook open graph.

Install Yoast SEO

To install UpdraftPlus plugin follow below steps:

  1. login to your WordPress dashboard.
  2. select plugins >> add new from admin menu.
  3. in search box enter “Yoast SEO” and install it.

Yoast SEO: General Settings

After installing the plugin you will see SEO tab in your admin menu, clicking it will take you to Yoast SEO general section, where you can start introduction tour, view latest changes and restore default settings.

Company Info

Click on company info tab in general settings. Now fill the information about your website and the company or person behind it.

Webmaster Tools

  • Go to Google search console and create an account.
  • Now come back to Yoast Seo > General > Webmaster Tool and click on Google Search Console link and then you will be redirected to verification page where you can verify your site.

Yoast SEO: Titles & Metas

This is one of the most important settings for Yoast SEO, it determines how your site will look in search engine, now navigate to Yoast SEO > Titles & Metas and follow below guide:

General

You can also choose the separator used between post title and site title. We recommend using default one which is dash.

Homepage

In this tab we’re going to add title and description for our homepage, this tool will then create meta tags out of them and add it to our homepage. In simple words the title and description you will put inside this input box will how your site homepage will look in search engine result.

Yoast Seo Meta

Post Types

Leave this section as it is. If you want your image, tag, categories, page, post etc to now show in search results then you can simple select noindex for it, but its not recommended, why would you do it? So leave it as it is.

Taxonomies

Suppose you have a post with category or tag “Technology” then it will be displayed under yoursite.com/tag/technology. Now if you don’t want search engine to show this URL in your search result you can noindex it but we don’t recommend it, So leave it as it is.

Archives

If you’re running multi author blog which means if more than one person write blog posts on your blog then Enable author archive and noindex Meta Robots.

Yoast SEO: Social

Yoast SEO allow you to integrate your site with social media, to access this page navigate to Yoast SEO > Social.

Accounts

Add all your social media profiles URL in their respective input box as shown in below image:

Yoast SEO Social

Facebook

Enable open graph meta data and now in Frontpage settings upload an image URL(this image will be shown when someone will share your site URL on facebook) and fill title and description as snow in below image:

Yoast SEO facebook

Google+

Enable Google+ specific post meta data and also add your google+ page URL in Google Publisher Page input box.

Yoast SEO: XML Sitemaps

Sitemaps are very essential for your WordPress site. Every search engine looks for sitemap of website, it tells search engine when your post a new article, It helps you get your blog index in search engine like google, bing, yahoo easily.

General

Enable XML sitemap functionality, Now click on XML sitemap button and copy the URL and submit it for index in your Google Search Console account.

Yoast SEO: Advanced

The advanced settings page allows you to configure permalinks, breadcrumbs and RSS feed related settings.

Breadcrumbs

To know what will happen after you enable the breadcrumbs, see below image:

Yoast SEO Breadcrumbs

As you can see in above image, when you enable breadcrumbs your URL looks more clean though I prefer to not enable breadcrumbs because URL contains keywords which are good for ranking but if you want to enable it for your blog then you can Enable Breadcrumbs and rest of the settings will be displayed. The default settings should work for most websites.

Permalinks

In permalinks tab there are many settings like striping category URL or redirecting attachment’s URL to parent post URL. Enable or disable setting as shown in below image:

Yoast SEO Advanced

Meta description & title for Individual Posts and Pages

Now whenever your create a new post or page for your blog when you will scroll down and you will find Yoast SEO box. Here you can look how your post will look in search result, If you want title or description to look different in search results you can even edit it. Just remember to always fill focus keyword input box, you can add multiple keyword separated by comma.

Yoast SEO Post Meta

If you find any problem while setting up Yoast SEO WordPress plugin then feel free to tell us via comment, If you like our post then please share it on social media ans subscribe to our newsletter.

Introducing HowlThemes automatic theme updater

Manually updating WordPress themes can be a pain, that’s why today we are introducing an automatic way to update your themes to latest version with just one click.

Whenever there will be an update available for your theme you will receive a notification about it on your WordPress dashboard.

WordPress Dashboard Update Notice

How to Update Theme

if updates are available for your theme than follow below steps to update your theme:

  • Go to Appearance >> Updates
  • You’ll see a input box asking for Theme Package URL
  • To get Theme package URL login to your howlthemes account and right click on Download button and copy the link.

HowlThemes Account

  • Now go back to Appearance >> Updates and paste the copied link in input box, and click Update Theme button.

howlthemes updater

That’s it, Just wait for few minutes and then refresh the dashboard, if you need any help please comment below.

VegetaPro Premium Blogging WordPress Theme

Responsive Design

Vegeta is fully responsive, every posts automatically changes its width according to screen size . It loads very quickly on mobile and provide better user experience.

Blogging Responsive WordPress Theme

 

Theme Customizer

The theme customizer allows you to tweak the theme’s settings and see a preview in real time.

 

Google Fonts

VegetaPro comes with lots of Google fonts pre installed, change fonts with just one click.

 

Automatic Update

With just one click of a button, you can update the theme that powers your website.

 

Schema Markup

It helps crawlers and bots to understand your HTML site structure and content properly.

 

Super Fast Loading

It loads in the blink of an eye to reduce bounce rate and to provide great experience.

 

Yoast Seo Compatible

VegetaPro works great with all SEO Plugin for WordPress out there but we recommend Yoast.

 

Email Subscription Widget

You can add email signup box in sidebar, It supports Aweber, Feedburner and Mailchimp.

 

Social Media Integration

VegetaPro comes with social sharing and follow buttons which are easily customizable.

 

Adsense Ready

We’ve made monetization easy for you! VegetaPro is designed with ads unit in mind.

 

Related Posts

Related post widget will keep your readers engaged, It will show post with same tags and categories.

 

Author bio box

We’ve added elegantly design author bio box which shows above comment form.

 

Complete Localization

This theme is translation ready which means you can translate it into any language.

How to backup and restore WordPress site using UpdraftPlus

Having backups of your site is extremely important. It is the best defensive measure you can take for your site, if somehow your website gets hacked and you lost all the data, with backup you can make your site live again in just few minutes. Please consider reading our post on WordPress website security.

For this tutorial we are going to use UpdraftPlus plugin, it is one of the best and simple to use WordPress plugin for taking backup and then restoring it. It has many features which will allow you to take automatic backup of wp database, plugins, themes and images.

Install UpdraftPlus

To install UpdraftPlus plugin follow below steps:

  1. login to your WordPress dashboard.
  2. select plugins >> add new from admin menu.
  3. in search box enter “UpdraftPlus” and install it.

Backup WordPress site to local computer

To backup your WordPress site to your local PC follow below steps:

  • Hover on settings tab in admin menu and then click on UpdraftPlus Backup.
  • Now click on button with text “Backup Now“.
  • popup will appear asking you for things you want to incluse in your backup, just tick Include the database in the backup and Include any files in the backup.
  • Now it will take some time to create a backup for your website.
  • To download the files you just backup, click on Existing Backups tab.
  • It will show you the list of backup available, click on each button to download it your PC.

updraftplus backup

  • After downloading all the backup to your PC delete it from your server because it will take approximately 200mb of space.

Backup WordPress site to cloud (Dropbox)

Now we are going to store our backup to remote storage and for this example I’m going to use dropbox. follow below steps:

  • Hover on settings tab in admin menu and then click on UpdraftPlus Backup.
  • Now click on Settings tab.
  • Scroll down to Choose your remote storage and select one of the option (I’m going to choose dropbox)
  • Now scroll down to Include in files backup and tick all the files you want to backup.

  • Finally click on Save Changes button.
  • After clicking on save button scroll up and reach Authenticate with Dropbox option and click on the link.
  • Login to your dropbox account and give UpdraftPlus permission to upload files in your account.

dropbox updraftplus permission

  • After allowing updraftplus to upload file to your dropbox account your will be redirected back to updraftplus dashboard and you should see following message.

updraftplus message

  • Now whenever you will click on “Backup Now” button remember to tick Send this backup to remote storage option.

updraftplus backup popup

Restore a WordPress site from backup

Let’s simulate a situation in which hacker have access your WordPress site and they have deleted all posts, pages, images, theme, plugins and everything. What will you do in this case? Well if you have backup then you can make your site live in just few minutes.

  • To restore website from backup, you should first install UpdraftPlus plugin in your website.
  • Click on Restore button.
  • If your backups are not already listed then click on Upload backup files link and upload the backup.

upload backups

  • After uploading all the backups file, click on restore button, a popup will appear asking you what you want to restore, just tick everything and on restore button.

  • Finally you have restored your website from the backup you created earlier.

WordPress caching: W3 Total Cache setup guide

Caching is a process in which document such as image, html pages are stored temporarily to reduce load on server and make page loads fast. Speed plays an important role in the life of any website, it can affect your search rankings and it can have a huge affect on user experience.

You can see how fast howlthemes loads, its because we are using W3 Total Cache and off course Nginx server provided by DigitalOcean. WordPress core does not perform well on its own. To improve its performance we can add caching rules on various elements of the website and at the server level. The most easiest way to add caching to WordPress is by using plugins, and one of the most popular is W3 Total Cache, this plugin guarantee to at least 10x improvement in overall site performance.

Install W3 Total Cache

To install W3 total cache plugin follow below steps:

  1. login to your WordPress dashboard.
  2. select plugins >> add new from admin menu.
  3. in search box enter “w3 total cache” and install it.

Basic W3 Total Cache settings :

After installing and activating the plugin you will see performance tab added in your admin menu. Now I will tell you what settings you should enable and explain benefits of each.

General Settings

  • Enable Page Cache and select Disk: Enhanced method.
  • Enable Minify set mode to manual and make Disk minify cache method. In some cases minify break the theme so just disable it in that case.
  • Disable database cache, enabling database caching is not recommended because in some case it breaks functionality of some plugins.
  • Enable object cache, it increases performance of dynamic websites. Object cache method should be Disk.
  • Enable browser cache.
  • Enable CDN, it is highly recommended. It decreases load on server and increases uptime.

Advanced W3 Total Cache settings :

Now we are going to configure more advance settings, follow the below instructions:

Page Cache

Access page cache setting by going to Performance >> Page Cache

Page Cache- General

  • Tick cache front page.
  • Tick cache feeds.
  • Tick cache SSL (https) requests.
  • Untick cache URIs with query string variables.
  • Tick cache 404 (not found) pages.
  • Tick cache requests only for www.howlthemes.com site address
  • Untick don’t cache pages for logged in users.
  • Tick don’t cache pages for following user roles

Page Cache- Cache Preload

  • Tick automatically prime the page cache.
  • Change update interval to 11000 seconds.
  • Enter your sitemap URL.
  • Tick preload the post cache upon publish events.

Browser Cache

Access browser cache setting by going to Performance >> Browser Cache

Browser Cache- General

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Tick Set cache control header.
  • Tick Set entity tag (eTag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.
  • Untick Prevent caching of objects after settings change.
  • Untick Don’t set cookies for static files.
  • Untick Do not process 404 errors for static objects with WordPress.

Browser Cache- CSS & JS

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Set Expires header lifetime: 31536000 seconds.
  • Tick Set cache control header.
  • Tick Set entity tag (ETag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.
  • Untick Prevent caching of objects after settings change.
  • Untick Disable cookies for static files.

Browser Cache- HTML & XML

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Set Expires header lifetime: 3600 seconds.
  • Tick Set cache control header.
  • Tick Set entity tag (ETag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.

Browser Cache- Media & Other Files

  • Tick Set Last-Modified header.
  • Tick Set expires header.
  • Set Expires header lifetime: 31536000 seconds.
  • Tick Set cache control header.
  • Tick Set entity tag (ETag).
  • Tick Set W3 Total Cache header.
  • Tick Enable HTTP (gzip) compression.
  • Untick Prevent caching of objects after settings change.
  • Untick Disable cookies for static files.

This settings will fix Leverage browser caching error which site gets in Google pagespeed insights.

Minify

Access minify setting by going to Performance >> Minify

Minify- General

  • Tick rewrite URL structure.

Minify- HTML & XML

  • Enable HTML minify settings.
  • Tick Inline CSS minification.
  • Tick Inline JS minification.
  • Tick Hide comments.

Minify- JS

  • Enable JS minify settings.

Minify- CSS

  • Enable CSS minify settings.
  • Tick Remove unnecessary backslashes.

That’s it. This settings should boost your WordPress site speed, if you face any problem please comment below.