This chapter explains about WordPress Optimization. WordPress is an open source platform used for designing various blogs or sites like CMS. In order to get the best rating from some search engines like Google, Bing etc. it is important to provide some great experience to the user while using the site. Following concepts are covered in this chapter:
Dynamic Caching Enabling
Maintaining the content quality and meaning
Image optimization
Themes optimization
Use CND
Minify the JavaScript and CSS files
Leverage browser caching
Dynamic Caching Enabling
Description
Adding configured Dynamic caching to the WordPress site will have great impact on the site's performance or speed. There are numerous service providers like APC and Varnish that can be utilized. However, each of them require a considerable measure of server configurations and tweaking of the application to work accurately.
Maintaining the content quality and meaning
Description
The page created should and must contain the good quality and meaningful content. The content should contain some keywords that most users look for on Google. Following are some tips to maintain the quality and meaningful content:
Create a structure of the blog post
The structure of the blog post have some rules like each post should contain some sort of introduction, body and conclusion etc. Write down the related content in all these sections.
Using paragraphs
Each and every paragraph should have some meaningful purpose.
Using headingsHeading structure represents what exactly the page is about. So, client should make a point to use headings, which play a vital role in reading and SEO aspects. Headings support Google to get a handle on the fundamental points of a long post and hence can help in positioning. On the off chance, users can also have subheadings in their articles. Subheadings helps audience to get a clear idea about the page, and makes the structure of articles much clearer. Ensure that the keywords are used a part of the subheadings, however don't put the same keyword in every subheading since that makes the content muddled.
Image optimization
Description
Images form a vital part of each site. It is very important to have them optimized. There are a few things with that one should keep in mind while working with images in WordPress.
Image size is important while uploading the images into WordPress media library. Use some cropping tools to maintain the same size for all images.
Use unique names while saving the images, give the title and alt tags for every image. If the image is about WordPress Optimization, then the image is as follows:
wordpress-optimaization.jpg/.png.
Themes optimization
Description
Themes that have been designed or coded badly and images that are used throughout the design will add superfluous weight to the page. Some WordPress themes are megabytes in size, which could add a few moments to the page stacking time.
Search engines support only responsive designs to guarantee all pages have the same URL. However, responsive designs are particularly designed to support cellular gadgets and can enhance clients' experience significantly. So, make sure to select a theme such that it can support desktops, tablets and cell phones.
Use CND
Description
Each site is facilitated in a data center in the world. When a visitor is from the area of the same server location, the more time it takes to stack the pages.
Content Delivery Networks (CDN) address this issue by using many server farms all around the world and removes the overwhelm work from facilitating organizations by hosting the pictures. The CSS and Javascript files are served to visitors from nearby location due to which seconds can be detracted from the page stacking times.
Minify the JavaScript and CSS files
Description
Each and every call to the CSS and Javascript files is a HTTP request indicating the visitors for the site. The PC sends a solicitation for a document after which the server sends it back. The more demand to the server, the more it will take for stacking the pages.
The PHP5 application Minify join various CSS and Javascript files into a solitary file. This significantly decreases the quantity of HTTP requests. Likewise, the application evacuates superfluous white space and comments. There are various WordPress modules accessible to minify CSS and Javascript like Better WordPress Minify or WP Minify.
See the following tutorial WordPress Plugins to check the download and installation process of Plugins.
Leverage browser caching
Description
The leverage browser caching indicates to what extent the visitor’s browser should cache the CSS, JS, images and flash files. In case, if any of those resources is set, then the server will notify the visitor’s browser and the cache content is replaced with the new content. Add the following line below the .htaccess file in order to empower or enable the procedure.
[c]
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType application/x-javascript “access 1 month”
ExpiresByType application/javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType application/x-icon “access 1 year”
ExpiresDefault “access 2 days”
</IfModule>
[/c]
Summary
Key Points
Optimizing the website is no more an alternative. The search engines are emphasizing on the speed of the site, which is very important to have a quick stacking site pages.
Many people think that one should be a specialist in order to enhance the performance of the WordPress site. In reality, one can enhance the site accurately just by following great practices, and exploiting caching and content delivery network (CND).