wordpress best security&speed tutorial

Generally, users prefer to browse sites that have better page loading speed and security, according to a report by the Microsoft Bing search team, a 2-second longer delay in page responsiveness reduceduser satisfaction by 3.8%, increased lost revenue per user by 4.3%, and a reduced clicks by 4.3%.

1. Remove Unused pages, plugins or themes

Any small improvement in website performance can and will help with visitor satisfaction. This means it is worth the time to do what you can to improve website performance. Deleting these old themes and plugins is a quick and easy way to assist in these efforts. Start by navigating to the Plugins,themes or pages  area of your dashboard and finding what you want to remove within the list.

2. Install a Caching Plugin

the good news is, while there are many ways to improve the speed of WordPress, one of the easiest options is to use a caching plugin. Usually, the pages and posts on your site won’t change much once published unless you redesign your site or update content. So what a caching plugin does is create a static version of your web page that it delivers to your visitors.

W3 Total Cache , WP Speed of Light, Comet Cache

also there is a way to caching manually

To enable browser caching you need to edit your HTTP headers to set expiry times for certain types of files.Find your .htaccess file in the root of your domain,This file is a hidden file. In this file we will set our caching parameters to tell the browser what types of files to cache.

<IfModule mod_expires.c>
  ExpiresActive On

  # Images
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType image/x-icon "access plus 1 year"

  # Video
  ExpiresByType video/mp4 "access plus 1 year"
  ExpiresByType video/mpeg "access plus 1 year"

  # CSS, JavaScript
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"

  # Others
  ExpiresByType application/pdf "access plus 1 month"
  ExpiresByType application/x-shockwave-flash "access plus 1 month"

3. lazyload feature

Basically, lazy loading put a reference src attribute to the lazily loaded web page resources (image, video, etc.), and add another attribute for the original content.Visiting a page consumes bandwidth and uses memory to save the cached data. Quitting the page very quickly may result in wasted memory and bandwidth.