1. Home
  2. Hosting
  3. cPanel Hosting
  4. How to Reduce WordPress Memory Usage
  1. Home
  2. Hosting
  3. Problem Solving
  4. How to Reduce WordPress Memory Usage

How to Reduce WordPress Memory Usage

WordPress is known to be a heavy user of your resources like PMEM (Physical Memory), I/O, IOPS, EP, and NPROC. To help reduce WordPress Memory Usage you can disable the WordPress cron and enable the cPanel cron instead.

This article assumes you have already installed WordPress and can log into your WordPress dashboard. If you haven’t installed WordPress yet, please do so now. You can refer to our other Knowledge Base Article, “How to Install WordPress”.

  1. Disable your WordPress Cron by editing your wp-config.php file. You can do this by logging into your cPanel, navigating to File Manager then opening your /public_html directory. In this directory, you should see wp-config.php

    files - file manager
    location of wpconfig
  2. Next, open wp-config.php for edit. adding one line of code to your wp-config.php file. Paste the following line.

    define(‘DISABLE_WP_CRON’, true);

    edit wp-config
    Now wp-cron.php will no longer load every time someone loads your pages and ensure that no cron-related work is done in any user request. This will reduce some MySQL database queries also.
  3. Next, log in to your cPanel account, find the Advanced panel and click the Cron jobs.

    location of cronjobs in cpanel
  4. The cPanel Cron Jobs page will load. Verify that the current email address is one that you can check. You can change it here and then click on the blue Update Email button.

    cron jobs page in cpanel
  5. Scroll down to the Add New Cron Job section, and choose the interval that you want to run the cron job. In the Minute field, I have set it to run every 15 minutes and leave blank Common Settings, Hour, Day, Month, and Weekday fields. But you can change it according to your liking.

    In the Command field, enter the following line.

    wget -q -O – http://domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    cron jobs common settings
    Don’t forget to replace domain.com with your blog URL and click the Add New Cron Job button.
  6. After you click on the Add New Cron Job button, you will get a confirmation and the Current Cron Jobs section on this page will look like this:

    new cron successfully added
  7. Additionally, it’s recommended that you also install LiteSpeed Cache for WordPress (LSCWP). You can find instructions on how to install LSCWP at this link.

    If these recommendations do not solve your memory usage issues, you have two other options.

    Option 1. Log in to your Orange Website Client Area and create a technical support ticket asking for a Double Your Resources Package. The cost of the package increase is approximately half of the hosting package.

    – CPU 100% → 200%
    – PMEM 1GB → 2GB
    – IO 2MB/s → 4MB/s
    – IOPS 1024 → 2048
    – EP 20 → 40
    – NPROC 100 → 200

    Option 2. Upgrade to either a Cloud VPS or Dedicated Server Hosting Plan.

Not a customer? Did you like this knowledgebase article?
If you did like this knowledgebase article and are not currently a customer but are looking for a trusted offshore host, feel free to browse what we have to offer over at OrangeWebsite. We have products that fit everyone from individuals to small, medium, and big-sized businesses. We just might be what you are looking for.

Updated on July 29, 2024
Was this article helpful?

Related Articles