WordPress website slowness

Here are the following few things that you should do at your end:

-->> Plugins:

Before you install any plugin on your website, ask yourself “Is this plugin necessary?”.

Plugins are one of the biggest causes of WordPress websites being slow. The more plugins you install without research, the more likely you will face performance issues; however the sheer number of plugins you have installed is not the reason a WordPress website can slow down.

Certain plugins are known for causing websites to be slow. There are many reasons for this including bad coding, calls to external servers and persistent calls and updating of your WordPress database. Pay close attention to how much CPU plugins use too. Many plugins can bottleneck your CPU due to persistent processes.

-->> Themes:

A design that has been coded badly, or uses images throughout the design, will add unnecessary weight to your page. It is not uncommon for some WordPress themes to be a few megabytes in size. Such a design could add a few seconds to your page loading time.

Choose a design that has been optimized for desktops, tablets and mobile devices. Search engines favor responsive designs as they ensure all pages have the same URL, however adaptive designs that were created specifically for mobile phones can improve a mobile user’s experience considerably (it is not uncommon for an adaptive design to reduce page size by over one megabyte). Unfortunately, most theme developers optimize their theme demo website using caching and content delivery networks. This makes is difficult to know how quick a WordPress design is before using it yourself.

-->> Empty Your Trash

WordPress 2.9 introduced the WordPress trash system. Whenever content is deleted, be it a comment, post, page, media etc; it is sent to trash. From here, the content can either be restored or deleted permanently. It is effectively a fail-safe system that helps you recover anything that was deleted accidentally (in much the same way the recycling bin works in your computer).
Trash can take up a lot of unnecessary room in your website’s database. The bigger the database, the longer it is to retrieve information from it.

By default, WordPress will automatically delete trash after thirty days. This can be reduced by modifying the wp-config.php file. For example, you could reduce this to seven days by adding the following:

---
define ('EMPTY_TRASH_DAYS', 7);
---

You can completely disable the trash system by adding this to your wp-config.php file.

---
define ('EMPTY_TRASH_DAYS', 0);
---

-->> Reduce Post Revisions, Drafts, Spam, Pingbacks and Trackbacks

It is not just trash that can needlessly increase the size of your database. All post types populate table rows with data. Therefore, it is important to regularly delete spam comments and unwanted pingbacks and trackbacks. You should also be wary of the number of drafts and post revisions your website has stored. The WordPress revision system allows you to go back to older versions of articles, view them and restore them.

In addition to one autosave of your posts and pages, revisions will be generated each time you save your articles. This means that an article with ten revisions with take up ten times as much room on your database than the actual article that was published. As you can imagine, this increases the size of your database considerably.

By default, WordPress will save an unlimited number of revisions, however this is generally not needed. It is better to reduce this limit to something more practical such as two or three. You can do this by adding the following code to your wp-config.php file:

---
define( 'WP_POST_REVISIONS', 3 );
---

Alternatively, you can completely disable the post revision system by adding the code below to your wp-config.php file. From a blogger’s perspective, this is not an optimal set up as post revisions are very useful, however many website owners have taken this step to ensure their database runs more efficiently.

---
define( 'WP_POST_REVISIONS', false );
---

-->> Images can help break up long pieces of text and can help your articles be shared more frequently on social media services; however they also take up a lot of storage. Therefore, pages that contain many images can take a long time to load. It is therefore in your best interests to optimise your images for the internet before you upload them to your website. Most photo editing applications, such as Photoshop, allow you to do this via the “Save for Web” option.

A good plugin to optimize images that have already been uploaded is WP Smush.it. It utitlizes the Smush.it API to optimize JPEG images, strip meta data from JPEGs and convert GIF images to PNG. You should however be aware that the plugin uses up a lot of resources when it is converting images, therefore your website may be slow whilst it is running.
If you do not want to sacrifice image quality, check out Lazy Load. The plugin ensures that images are only loaded when the area becomes visible to the user. This will greatly reduce page loading times.

-->> Install a Cache Plugin

Caching plugins allow you to publish static HTML files instead of dynamic files. This greatly reduces the time a page takes to load as there are no PHP or MySQL commands to execute.
Additional caching features include minification, caching of feeds, Gzipping, Content Delivery Network (CDN) support, and much more. Caching your pages is one of the most effective ways of improving your page loading times, with many plugins promising an improvement of at least ten times. Popular caching plugins include WP Super Cache, W3 Total Cache and WP Fastest Cache. All three plugins are available free.

-->> Your website is hosted in a data center somewhere in the world. The further a visitor is from the location of your data center, the longer it takes for your web pages to load.
Content Delivery Networks (CDN) address this issue by utilizing dozens of data centers around the world. They take the heavy work away from your hosting company by hosting your images, CSS and Javascript files, and serving these files to visitors from the closest location to them. Seconds can be taken away from your page loading times because of this.

Popular content delivery networks include MaxCDN, Amazon CloudFront and CloudFlare. The cost of these services vary according to how much bandwidth your website uses.

Do assimilate the above mentioned steps and perform the actions as well to improve Site Performances.



Comments

Popular posts from this blog

SVN: File remains in conflict

HowTo: Enable extended logging for exim

12 tweakings for WHM/cPanel to speed up WordPress