• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
  • About
  • Contact
  • Subscribe
  • Advertise
methodshop

methodshop

tech news, reviews & how to's

  • Top Stories
  • Latest
  • Fun
  • Life
  • Learn

Home : Why And How To Disable WP-Cron.php: Will It Speed Up WordPress?

How To Speed Up WordPress
Image elements via alan9187 and typographyimages

Why And How To Disable WP-Cron.php: Will It Speed Up WordPress?

Here's how to disable wp-cron.php in WordPress, reduce server resources, and help speed up your WordPress website.

February 10, 2019 by Joe Michaels
FacebookTweetPinLinkedIn

From using GZIP compression to using WebP images, there are a million ways to speed up WordPress. But if your server is overloaded, then the only way to make your website faster is to reduce the tasks that it has to perform. Here’s how to disable wp-cron.php in WordPress, reduce server resources, and ultimately help speed up your WordPress website.

What Is WP-Cron And Why Should You Consider Disabling It?

Before we show you how to disable wp-cron.php, let’s review a few things first.

What exactly does the wp-cron.php script do? The wp-cron.php file contains a list of scheduled tasks for WordPress. These automated tasks include things like publishing your scheduled posts or checking for updates for plugins or themes.

One server setting, in particular, is the intervals in which the wp-cron.php script is called. By default, the wp-cron.php script is called each time a new visitor comes to your WordPress site. Calling this script multiple times an hour is unnecessary. This can cause high resource usage on your server and crash your site.

Learning how to disable wp-cron.php is easy, but you will need to replace it with a cron task in cPanel. This tutorial will show you how.

NERD NOTE: What exactly does the wp-cron.php script do? The wp-cron.php file contains a list of scheduled tasks for WordPress. These automated tasks include things like publishing your scheduled posts or checking for updates for plugins or themes.

Take WP-Cron Control Away From WordPress

Before you can specify wp-cron settings at the server level, you need to tell WordPress to not worry about it anymore in the wp-config.php file.

  • Open your wp-config.php file using either your cPanel File Manager or an FTP program.
  • Scroll to the bottom of the database settings in the wp-config.php file.  It should be around line #40.
  • Add the highlighted line code below on a separate line right after define(‘DB_COLLATE’, ”);
** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
define('DISABLE_WP_CRON', true)

By default, WordPress will automatically run the wp-cron.php script every time a new visitor comes to your site. By disabling this, you will be giving your server a much-needed rest.

How To Disable Wp-Cron.php And Schedule Cron Jobs

Permanently disabling Cron jobs is a bad idea. You don’t want to prevent WordPress from executing necessary automated tasks. But WordPress doesn’t need to run the wp-cron.php hundreds or thousands of times an hour. Instead, we are going to just have the wp-cron.php script run every 6 hours.

  • Log into your cPanel dashboard.
  • Under the Advanced section, click on Cron Jobs.
Cpanel Advanced Wp-Cron Jobs
  • Select Once per hour from the Common Settings drop-down.
Wp-Cron Script Once Per Hour
  • Next select Every Sixth Hour from the drop-down.
Wp-Cron Every Sixth Hour
  • Type the following line of code in the Command line field and then click on the Add New Cron Job button. Swap out “username” with your actual cPanel username. Also, you may need to change public_html if you are modifying a WordPress install that is not the primary site on your server. The public html directory is the default folder for the main WordPress site on a server. If your site isn’t in the “public_html” folder, that’s perfectly fine. Just change what you type in the Command field to match your folder name.

cd /home/username/public_html; php -q wp-cron.php

Wp-Cron Command
  • After you add the script, you should now see that your new cron job listed. Please double check each character and make any edits if necessary.
Wp-Cron.php Scripts

Disable WP-Cron.php Default Behavior: Pros & Cons

How To Speed Up Wordpress - How To Disable Wp-Cron.php Tutorial
alan9187, typographyimages

WordPress is a very popular Content Management System (CMS). According to W3Techs, about 30% of all websites run on WordPress. But unfortunately, some WordPress default settings are not optimized for higher traffic websites.

If you are using a WordPress caching plugin like WP Rocket to increase page load speeds and still experiencing problems, then it might be time to reduce resource usage on your server by only calling your wp-cron.php script every few hours.

Tweaking your wp-cron.php file is easy. However, if you don’t have access to cPanel, then don’t disable cron. Doing so will cause issues for your site like missed scheduled posts.

Good luck!

Related Posts:

  • WTF - This Insane Toyota Corolla Commercial Is Full of Cats, Martial Arts and High-Speed Car Chases
    WTF - This Insane Toyota Corolla Commercial Is Full of Cats,…
  • The World's Most Effective Speed Bump
    The World's Most Effective Speed Bump
  • Have You Seen This? Canadians Are Using Photos Of Children As Speed Bumps
    Have You Seen This? Canadians Are Using Photos Of Children…



FacebookTweetPinLinkedIn
Tag: cPanel, Cron Jobs, DIY Tutorials, Internet, Software, web server, WordPress, WP Rocket, wp-cron.php
Previous Post: « Vaping Science The Science Of Vaping: How It Works & What You’re Actually Inhaling
Next Post: Driver Randomly Backs Up To Safety Seconds Before A Car Crash Driver Randomly Backs Up To Safety Seconds Before A Car Crash »

Sidebar

Trending Now

  • 18 Weird Facts About Sea-Monkeys You Won't Believe Are True, Including Their Connection To The Ku Klux Klan18 Weird Facts About Sea-Monkeys You Won’t Believe Are True, Including Their…
  • 20 Famous People Who Are Members Of The Sleepless Elite20 Famous People Who Are Members Of The Sleepless Elite
  • The 30 Best Caddyshack Quotes That'll Make You LaughThe 30 Best Caddyshack Quotes That’ll Make You Laugh
  • Is Your Hatch Restore Already Registered? Here's How To Fix It And Unregister A Hatch Restore.Is Your Hatch Restore Already Registered? Here’s How To Fix It And…
  • A Few Good Men Quotes: The 12 Most Dramatic Quotes From The FilmA Few Good Men Quotes: The 12 Most Dramatic Quotes From The Film
  • 7 Reasons Why A Team America 2 Sequel Will Never Get Made7 Reasons Why A Team America 2 Sequel Will Never Get Made
  • 25 Reasons Why Action Park Was The World's Most Dangerous Amusement Park25 Reasons Why Action Park Was The World’s Most Dangerous Amusement Park
  • 7 Pictures Of Naked People Captured By Google's Cameras7 Pictures Of Naked People Captured By Google’s Cameras
  • 1 Night In Paris - An Honest Review Of The Paris Hilton Sex Tape1 Night In Paris – An Honest Review Of The Paris Hilton Sex Tape
  • Gosh! Here Are 10 Napoleon Dynamite Quotes That We Will Reference ForeverGosh! Here Are 10 Napoleon Dynamite Quotes That We Will Reference Forever

Categories

About

MethodShop’s mission is to entertain, inform, and sometimes gross you out. MethodShop has affiliate relationships, so we may get a small share of the revenue from your purchases. Items are sold by the retailer, not by us. All prices are subject to change.

Latest

Apple AirTag Helps Police Recover Stolen Political Yard Signs At Opponent's Fort Lauderdale Home

Apple AirTag Helps Police Recover Stolen Political Yard Signs From Opponent’s Fort Lauderdale Home

Vintage Sexist Ads

The 28 Most Sexist Ads From The Mad Men Era Of Advertising

Follow

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • Pinterest
MethodShop Animated Zoom Icon
  • About
  • Submit
  • Disclaimer
  • Privacy Policy
  • Contact
  • Subscribe
  • Store

Copyright © 2022 MethodShop · All Rights Reserved · Powered by BizBudding Inc.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie settingsACCEPT
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT