1. Knowledge Base
  2. >
  3. Results
  4. >
  5. How To Optimize a WordPress Installation

How To Optimize a WordPress Installation

 

One of the greatest benefits of using WordPress is its customizability. The drawbacK is that you may easily configure WordPress so that it has high resource usage. Your resource usage can impact other users, violate the Terms of Service, and cause suspension of your site with little to no warning.

The vast majority of issues that cause WordPress to consume too many resources result from coding that HostGator is unable to support. However, this article recommends optimizing WordPress and reducing the CPU and resource consumption so you can have a better hosting experience.

Optimized WordPress (OWP) is the superior platform for hosting WordPress sites. OWP is a managed WordPress hosting service that includes CodeGuard, SiteLock, server-side caching, and we carefully evaluate and blacklist plugins that are harmful to your site.

If you want to run an optimized WordPress site easier and to have the best WordPress hosting experience, use Optimized WordPress:


How To Optimize a WordPress Website

Upgrade to the Latest Version of WordPress

The latest WordPress versions have optimized code that could reduce the CPU consumption of your site. Please click the expand below for the complete instructions.

How To Update WordPress Version
Note: Updating WordPress can have adverse effects on your theme or plugins. Many themes and plugins have updates available from the same Updates page. If your theme or plugins are incompatible with an updated WordPress, we advise seeking an alternative theme or plugin.

To upgrade your version of WordPress:

  1. Log in to your WordPress Dashboard.
  2. Click Dashboard and then select Updates. This section will display available updates in your WordPress install.

    WordPress Update

  3. Click Update Now.

    Update WordPress version

After WordPress finishes upgrading to the latest version, it will display a page letting you know about its newest features and changes.

By returning to the Updates page, you will also be able to update any installed themes or plugins to the latest version, which is strongly recommended for the best WordPress experience.


Review Your Plugins

WordPress users are already familiar with how dramatically plugins can affect the behavior of a website, and resource usage is no exception. HostGator offers the following article to help with your plugins usage:

This article will assist you with making the following changes:

  1. Installing plugins that help your site perform better.
  2. Identifying plugins that hurt your site so you can uninstall them.
  3. Recommending well-developed plugins for common needs, such as SEO.


Minimize the Number of WP Crons

The WordPress Cron job is a resource-intensive task that runs every single time visitors access your WordPress. You can greatly improve your site's performance with the advice in this article:

 

Limit WebCrawlers and Bots

Web crawlers can often cause resource problems for WordPress sites. The first tool for protecting your site against web crawlers is a robots.txt file. Please review the instructions below for assistance with creating a robots.txt file to improve the WordPress site's performance.

How To Create a robots.txt File
Note: This is a generalized robots.txt that will work for most WordPress sites. Please see the following article for information on advanced robots.txt configuration:

These are the step-by-step instructions for creating a file called robots.txt in the document root for your WordPress site. The file should contain the following text:

To create the file:

  1. Log in to cPanel.
  2. Click on the File Manager icon.

    cPanel File Manager

  3. Navigate to your site's document root.
  4. Click on the + File icon.

    Add File

  5. Name the file robots.txt, then click Create New File.

    create robots.txt file

  6. Do a right-click to the robots.txt file, then select Edit.

    Edit File

  7. In the new pop-up dialog box, click Edit.

    Edit Code

  8. In the new window, enter the code below, then click Save Changes.
    
    User-agent: *
    Disallow: /cgi-bin/
    Disallow: /wp-admin/
    Disallow: /wp-includes/
    Disallow: /wp-content/
    Disallow: /trackback/
    Disallow: /index.php
    Disallow: /xmlrpc.com
    Disallow: /wp-login.php
    Disallow: /wp-content/plugins/
    Disallow: /comments/feed/
    
    User-agent: Yandex
    Disallow: /
    
    User-agent: Baiduspider
    Disallow: /
    

    Save Changes

Congratulations! You have successfully created a robots.txt file!

In addition to robots.txt, the Bing Network and Google Webmaster accounts offer tools to help reduce the rate that crawlers initiate requests with your site, reduce the resources, and allow for more legitimate traffic to be served.


Check Your Theme

Sometimes, the coding of a theme can cause resource issues on a WordPress site. Fortunately, this is simple to test for. Please note that this method will not work for sites that are currently access restricted. The site must be able to have traffic to test resource usage accurately.

  1. Familiarize yourself with how to monitor resource usage from the following article:
  2. Set your WordPress to a default theme.
  3. After several hours of usage, check your resources to see how your WordPress functions with the default theme.
  4. Activate your theme of choice.
  5. After several hours of usage, check your resources to see how the new theme has impacted the resource usage of your site.

If your theme is causing resource issues for your site, you need to contact your theme developer or select a new theme.

These changes are not guaranteed fixes but provide a starting point for correcting high load issues on WordPress sites. These recommendations are provided in order of complexity and will have varying results depending on the specific cause of the resource usage of your WordPress site.

HostGator offers design services! If you have difficulty with the recommendations in this article or are not sufficient and your site cannot function on shared hosting, you may wish to consider having us create a new resource-friendly site for you.
Have further questions? Please don't hesitate to contact us via phone or Live Chat so we can assist!