Javatpoint Logo
Javatpoint Logo

How to optimize WordPress performance

WordPress Optimization

You should optimize your WordPress site and server for the best possible outcome. This thing is necessary for all the sites whether containing a large traffic or a small traffic.

It increases the speed of your site, which provides a great experience to your users and improve your ranking because loading time is also considered in search engines.

There are a lot of tricks through which a user can optimize the WordPress site performance. We?ll see to some of them in this tutorial.

  1. Choose a Good Web Host
  2. Use a Caching Plugin
  3. Use a simple Theme/Framework
  4. Use CDN
  5. Optimize images for Speed
  6. Split long posts into smaller pages
  7. Split Comments into Pages
  8. Remove Inactive Plugins
  9. Keep your site Updated
  10. Don't upload Videos to WordPress site
  11. Optimize WordPress Database
  12. Enable Gzip Compression
  13. Install well-coded Plugins
  14. Replace PHP with HTML code wherever Possible
  15. Delete Old posts Revisions
  16. Turn off Trackbacks and pingbacks
  17. Use a responsive design
  18. CSS in Head, JS in Body (remove unnecessary Jscripts)

Choose a Good Web Host

Your site's performance greatly depends upon your chosen web host. So choosing web host is a very important decision. If your web hosting service is not quite good, then other tricks to increase your site's performance may not work.

Do a complete research about the host you are opting for. Read its reviews and comments from the experts. It's better to pay some extra bucks rather than choosing a cheap one and compromising with quality.


Use a Caching Plugin

A caching plugin serves a cached version of your page to the user's browser instead of generating every page on the fly.

It is important because WordPress is written on PHP, which is a server side programming language. It means whenever someone visits your site, WordPress runs a process to fetch the information and then display it the user's browser which is quite time consuming and my slow down your site.

Wordpress How to optimize wordpress performance1

Use a fast Theme/Framework

Your installed WordPress theme should be fast and well-coded. Don't choose a theme with lots of features which you don't need, it will negatively affect your site.

Large themes use lot of CSS, JavaScripts, PHP and Iframes which takes a lot of time to load. If you want to use complicated themes, minimize its coding or hire a developer to bring out best from the theme.

Default WordPress themes are best to use as they are well-coded and light-weighted to load.

Wordpress How to optimize wordpress performance2

Use CDN

CDN stands for Content Delivery Networks. It is a network of geographically dispersed servers which delivers cached content based on the geographic locations of the user from the websites.

Static resources of a site like images, CSS files and scripts, stop the page from displaying into a user's browser. CDN can resolve this problem by serving static files to the users from their closet servers across the world. Due to this load on the primary server also reduces and hence gives the better result to the users.

Wordpress How to optimize wordpress performance3

Optimize Images for Speed

Images are one of the heavier elements and take longest time to load in your site. Most websites have a lot of images on each page.

Before using images, make sure that they are properly optimized for the web.

Wordpress How to optimize wordpress performance4

Split long posts into smaller pages

For a long post article with a lot of images, it is better to split them into multiple pages. WordPress has a built in functionality for this.

Just add tag in your article wherever you want to split your page.

Wordpress How to optimize wordpress performance5

Split Comments into Pages

Some articles may have a lot of comments received. Loading all the comments in a single page will take a lot of time for loading. It is advisable to split the comments into multiple pages to reduce the load time.

WordPress built-in solution for this is go to Settings > Discussion and check the box Break comments into pages.

Wordpress How to optimize wordpress performance6

Remove Inactive Plugins

Plugins which are used no more are needed to be uninstalled quickly. Many users forget after installing plugins which are not even used any further on their site.

They increase your site size and slow down the speed of your site.


Keep your site Updated

WordPress automatically updates its site regularly. Updates helps to fix bugs, security issues, and offer some new features.

It is essential to keep your site updated on a regular basis. All plugins and themes should also be regularly maintained and updated. Not updating your site regularly may cause some security issues for your site.

Wordpress How to optimize wordpress performance7

Don't upload Videos to WordPress site

Directly uploading videos to your WordPress site consumes a lot of bandwidth. These video qualities can't be optimized for high performance by WordPress.

It is better to embed videos in WordPress from video hosting sites like YouTube, DailyMotion, Vimeo, etc. it improves page load speed of your site.


Optimize WordPress Database

After some time when you start using your WordPress site, your WordPress database may have some unused data which you don't need any more. Your database needs to optimize your database table for better performance.

There are some plugins for this which allows you to clean your WordPress site by deleting trash, pending spam comments, orphaned meta, etc. it also optimizes database table structure and gives you a fast responding database.

Wordpress How to optimize wordpress performance8

Enable Gzip Compression

Serving a compressed version of your site to your visitors results in less loading time due to the smaller size.

You can enable Gzip compression either from your cPanel (if your host allows so) or from a WordPress plugin. You can also enable it from your .htaccess file.

Wordpress How to optimize wordpress performance9

Install well-coded Plugins

There are a lot of WordPress plugins available but all of them are not well-coded. Always go for the plugins which support latest WordPress version and are highly optimized.

Poorly developed plugins not only slow down your site but also affects other plugins functionalities.


Replace PHP with HTML code wherever Possible

Plain HTML code loads much faster than PHP codes on web servers. If possible then replace some PHP code with HTML code on your site.

HTML loading time is around 20 times faster than PHP.


Turn off Trackbacks and pingbacks

Whenever someone links to your site, a trackback gets created which utilizes your server and database resources which ultimately affect your site's speed.

So when you don't need trackbacks just disable them from Settings > Discussion, unchecke the box of trackbacks and pingbacks.

Wordpress How to optimize wordpress performance10

Use a Responsive design

Responsive designs are used to load less resource for small screen devices and high resolution images for larger screens. This way small screen users won't get a heavy image and large screen users won't get a smaller highly compressed image.


CSS in Head, JS in Body (remove unnecessary JavaScripts)

Link CSS stylesheets in the Head tag of HTML coding. Using it outside the Head tag prevents the browser from displaying content of the page as soon as page is loaded.

Use JS in the Body tag of the HTML coding. JavaScript tags stops the progressive loading of the page. Whenever a browser encounters a JavaScript tag, it tries to interpret it before loading the rest of the page. So it is advisable to use JavaScript tag at the end of the page.

This trick will not reduce your site's size, but it will help in loading your site a little faster.

Next Topic#




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA