SlideShare a Scribd company logo
Automated Tasks
for
By Joe Cartonia
About me
Name: Joe Cartonia
GitHub: https://github.com/cssjoe
Twitter: @joemotocss
I am a Buffalo native working in Virginia Beach as a WordPress plugin and API developer
for BoldGrid since 2014. I have been a WordCamp speaker a few times (Buffalo &
Rochester, NY), and have presented at some WordPress meetups. Technology
(electronics, computer hardware and software) has always been a major interest of mine
since the first grade. I also enjoy traveling, motorsports, snowboarding, playing guitar,
and spending time at the beach.
Topics covered in this presentation
● Using the Linux system cron instead of the default WP-Cron
● Automated backups
● Remote backup storage
● Automated updates
WP-Cron vs. System Cron
WordPress uses an internal task scheduler called WP-Cron. Tasks are scheduled and
completed when the items become due.
WP-Cron can be inefficient, as it checks the task event list when visitors load pages on
the site. High-traffic sites may see reduced performance and higher server load due to
the WP-Cron checks. It is recommended to switch to a system task/cron scheduler.
System cron schedulers (such as the Linux system cron) execute tasks on the exact
specified times, down to the minute. Some conditions can delay the actions, such as high
server load.
Using system cron instead of WP-Cron
Disable WP-Cron by modifying the wp-config.php file.
https://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-
in-wordpress
Add the following line to the wp-config.php file to disable WP-Cron:
define('DISABLE_WP_CRON', true);
After the file is saved, the WP-Cron system will not be triggered by site page loads.
Using system cron instead of WP-Cron
A system cron job can be added using cPanel, SSH (shell/terminal), or possibly other web
hosting panel software.
The following support article walks through the process:
https://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress
cPanel:
Under the Advanced section, click on Cron Jobs.
Select Once per hour from the Common Settings drop-down.
Now select Every Sixth hours from the Hour drop-down.
Finally fill in the code to run our cron job and click Add New Cron Job.
cd /home/userna5/public_html; php -q wp-cron.php
Using system cron instead of WP-Cron
A cron job can be added using SSH and the crontab command-line utility.
Login to SSH and run the following command to edit your crontab file (schedule):
crontab -e
In the editor, add the following line (changing your username and path):
0 */6 * * * cd /home/userna5/public_html; php -q wp-cron.php
Save the file.
The task will run at the top of the next sixth hour, and every six hours.
Performing Site Backups
One of the highest-recommended tasks for a site administrator is to perform regular
backups.
It is also recommended to store backups in an off-site location.
Backups can be performed manually or automatically.
Most site administrators backup their site using either a WordPress plugin or their web
host software (such as cPanel or Softaculous).
Using a plugin to automate backups
There are many backup plugins that can be installed from the WordPress.org plugin directory,
such as BoldGrid Backup.
https://wordpress.org/plugins/boldgrid-backup/
It is easy to install plugins and configure automatic backups.
● Login to your WordPress
● Go to Plugins >> Add New
● Search for "BoldGrid Backup"
● Click "Install Now", and then click on "Activate".
● Navigate to BoldGrid Backup >> Settings
● Select your Days of the Week, Time of Day, Backup Storage location, and click Save Changes.
Backups will complete on the schedule that you choose.
Backup Storage Locations
BoldGrid Backup can store backup archives on the local web server as well as remote
locations. The free version also supports FTP or SFTP (vis SSH). The premium version
supports other remote storage locations, such as Google Drive and Amazon S3.
If you do perform backups that are stored on the local web server and the software does
not provide a way to copy/move the backups to a remote location, then you can do it
manually or write a script or cron job to do it for you.
Automated Updates
There are WordPress plugins available that can perform auto-updates for plugins and themes.
Some of which include BoldGrid Backup, Jetpack, and Automatic Plugin Updates. It is also
possible to enable automatic core updates in the wp-config.php file and plugin/theme updates
using a filter function inside of your own must-use plugin.
To configure the settings yourself, you can follow the steps in the following WordPress article:
https://wordpress.org/support/article/configuring-automatic-background-updates/
Q & A
Please ask any questions that you may have.
Thank you!
I would like to thank everyone for attending.
Please follow me on Twitter: @joemotocss
This slideshow and others are available at: https://www.slideshare.net/JoeCartonia/

More Related Content

PDF
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
PDF
Improving WordPress performance (xdebug and profiling)
PPT
Automating your plugin with WP-Cron
PPTX
Ryan Duff 2015 WordCamp US HTTP API
PDF
Developers, Be a Bada$$ with WP-CLI
PDF
Automatic testing and quality assurance for WordPress plugins
PDF
Search 500-video-clips
PPTX
JavaScript Task Runners - Gulp & Grunt
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Improving WordPress performance (xdebug and profiling)
Automating your plugin with WP-Cron
Ryan Duff 2015 WordCamp US HTTP API
Developers, Be a Bada$$ with WP-CLI
Automatic testing and quality assurance for WordPress plugins
Search 500-video-clips
JavaScript Task Runners - Gulp & Grunt

What's hot (20)

PPT
Front End Website Optimization
PPTX
Anthony Somerset - Site Speed = Success!
PDF
さぶみっと
PDF
WordPress&映像配信セミナー+さぶみっと!オフ会- 第2回 さぶみっと! WEB制作セミナー Supported by NTTスマートコネクト
ODP
How I Learned to Stop Worrying and Backup WordPress
PDF
Yeoman Workflow
PDF
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
PPTX
PowerShell and SharePoint
PPTX
PowerShell for sharepoint 2010 administrators
PDF
Command Line WordPress with WP-CLI - WordPress Perth User Group
PDF
WordPress and The Command Line
PDF
Command Line WordPress with WP-CLI
KEY
Optimize wordpress
PPTX
Using the Command Line: Bash and WP-CLI
PPTX
Best Practices for creating WP REST API by Galkin Nikita
PPT
Yeoman
PPTX
Automated Development Workflow with Gulp
PPTX
WP-CLI: WordCamp Nashville 2016
PDF
Frontend JS workflow - Gulp 4 and the like
PPTX
SQL Server - CLR integration
Front End Website Optimization
Anthony Somerset - Site Speed = Success!
さぶみっと
WordPress&映像配信セミナー+さぶみっと!オフ会- 第2回 さぶみっと! WEB制作セミナー Supported by NTTスマートコネクト
How I Learned to Stop Worrying and Backup WordPress
Yeoman Workflow
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
PowerShell and SharePoint
PowerShell for sharepoint 2010 administrators
Command Line WordPress with WP-CLI - WordPress Perth User Group
WordPress and The Command Line
Command Line WordPress with WP-CLI
Optimize wordpress
Using the Command Line: Bash and WP-CLI
Best Practices for creating WP REST API by Galkin Nikita
Yeoman
Automated Development Workflow with Gulp
WP-CLI: WordCamp Nashville 2016
Frontend JS workflow - Gulp 4 and the like
SQL Server - CLR integration
Ad

Similar to Automated Tasks for WordPress (20)

PDF
Use Xdebug to profile PHP
PPTX
Session: WP Site Management using WP-CLI from Scratch
PDF
Development Setup of B-Translator
PDF
WordPress modern development
PDF
Core Web Vitals SEO Workshop - improve your performance [pdf]
PDF
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
PPTX
Caching 101
PDF
Introduction to Drupal - Installation, Anatomy, Terminologies
PDF
WPDay Bologna 2013
PPTX
Scraping the web with Laravel, Dusk, Docker, and PHP
PPT
Professional deployment
PDF
WordPress Plugin Development 201
PPT
WordPress Plugin Development- Rich Media Institute Workshop
ODP
Ubuntu And Parental Controls
PDF
Responsible [digital] Home Ownership
PDF
EuroPython 2013 - Python3 TurboGears Training
PPTX
Drupal performance optimization Best Practices
PDF
The wp config.php
PPT
Making the Most of Plug-ins - WordCamp Toronto 2008
PDF
Rock Solid Deployment of Web Applications
Use Xdebug to profile PHP
Session: WP Site Management using WP-CLI from Scratch
Development Setup of B-Translator
WordPress modern development
Core Web Vitals SEO Workshop - improve your performance [pdf]
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
Caching 101
Introduction to Drupal - Installation, Anatomy, Terminologies
WPDay Bologna 2013
Scraping the web with Laravel, Dusk, Docker, and PHP
Professional deployment
WordPress Plugin Development 201
WordPress Plugin Development- Rich Media Institute Workshop
Ubuntu And Parental Controls
Responsible [digital] Home Ownership
EuroPython 2013 - Python3 TurboGears Training
Drupal performance optimization Best Practices
The wp config.php
Making the Most of Plug-ins - WordCamp Toronto 2008
Rock Solid Deployment of Web Applications
Ad

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
A Presentation on Artificial Intelligence
PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
Assigned Numbers - 2025 - Bluetooth® Document
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Per capita expenditure prediction using model stacking based on satellite ima...
sap open course for s4hana steps from ECC to s4
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
A Presentation on Artificial Intelligence
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
Programs and apps: productivity, graphics, security and other tools

Automated Tasks for WordPress

  • 2. About me Name: Joe Cartonia GitHub: https://github.com/cssjoe Twitter: @joemotocss I am a Buffalo native working in Virginia Beach as a WordPress plugin and API developer for BoldGrid since 2014. I have been a WordCamp speaker a few times (Buffalo & Rochester, NY), and have presented at some WordPress meetups. Technology (electronics, computer hardware and software) has always been a major interest of mine since the first grade. I also enjoy traveling, motorsports, snowboarding, playing guitar, and spending time at the beach.
  • 3. Topics covered in this presentation ● Using the Linux system cron instead of the default WP-Cron ● Automated backups ● Remote backup storage ● Automated updates
  • 4. WP-Cron vs. System Cron WordPress uses an internal task scheduler called WP-Cron. Tasks are scheduled and completed when the items become due. WP-Cron can be inefficient, as it checks the task event list when visitors load pages on the site. High-traffic sites may see reduced performance and higher server load due to the WP-Cron checks. It is recommended to switch to a system task/cron scheduler. System cron schedulers (such as the Linux system cron) execute tasks on the exact specified times, down to the minute. Some conditions can delay the actions, such as high server load.
  • 5. Using system cron instead of WP-Cron Disable WP-Cron by modifying the wp-config.php file. https://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp- in-wordpress Add the following line to the wp-config.php file to disable WP-Cron: define('DISABLE_WP_CRON', true); After the file is saved, the WP-Cron system will not be triggered by site page loads.
  • 6. Using system cron instead of WP-Cron A system cron job can be added using cPanel, SSH (shell/terminal), or possibly other web hosting panel software. The following support article walks through the process: https://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress cPanel: Under the Advanced section, click on Cron Jobs. Select Once per hour from the Common Settings drop-down. Now select Every Sixth hours from the Hour drop-down. Finally fill in the code to run our cron job and click Add New Cron Job. cd /home/userna5/public_html; php -q wp-cron.php
  • 7. Using system cron instead of WP-Cron A cron job can be added using SSH and the crontab command-line utility. Login to SSH and run the following command to edit your crontab file (schedule): crontab -e In the editor, add the following line (changing your username and path): 0 */6 * * * cd /home/userna5/public_html; php -q wp-cron.php Save the file. The task will run at the top of the next sixth hour, and every six hours.
  • 8. Performing Site Backups One of the highest-recommended tasks for a site administrator is to perform regular backups. It is also recommended to store backups in an off-site location. Backups can be performed manually or automatically. Most site administrators backup their site using either a WordPress plugin or their web host software (such as cPanel or Softaculous).
  • 9. Using a plugin to automate backups There are many backup plugins that can be installed from the WordPress.org plugin directory, such as BoldGrid Backup. https://wordpress.org/plugins/boldgrid-backup/ It is easy to install plugins and configure automatic backups. ● Login to your WordPress ● Go to Plugins >> Add New ● Search for "BoldGrid Backup" ● Click "Install Now", and then click on "Activate". ● Navigate to BoldGrid Backup >> Settings ● Select your Days of the Week, Time of Day, Backup Storage location, and click Save Changes. Backups will complete on the schedule that you choose.
  • 10. Backup Storage Locations BoldGrid Backup can store backup archives on the local web server as well as remote locations. The free version also supports FTP or SFTP (vis SSH). The premium version supports other remote storage locations, such as Google Drive and Amazon S3. If you do perform backups that are stored on the local web server and the software does not provide a way to copy/move the backups to a remote location, then you can do it manually or write a script or cron job to do it for you.
  • 11. Automated Updates There are WordPress plugins available that can perform auto-updates for plugins and themes. Some of which include BoldGrid Backup, Jetpack, and Automatic Plugin Updates. It is also possible to enable automatic core updates in the wp-config.php file and plugin/theme updates using a filter function inside of your own must-use plugin. To configure the settings yourself, you can follow the steps in the following WordPress article: https://wordpress.org/support/article/configuring-automatic-background-updates/
  • 12. Q & A Please ask any questions that you may have.
  • 13. Thank you! I would like to thank everyone for attending. Please follow me on Twitter: @joemotocss This slideshow and others are available at: https://www.slideshare.net/JoeCartonia/