Automations: Installation and Setup

Automations is an add-on for the WP Sheet Editor plugins. This add-on allows you to automate bulk actions, bulk edits, individual edits, exports, and imports across the spreadsheet editors on WordPress. You can save a lot of time and increase your productivity by reducing your workload to a few scheduled tasks.

WP Sheet Editor - Automations: Automatic expors, imports and bulk actions

You need to follow the steps below to install and set up the WP Sheet Editor – Automations add-on:

1- Get what you need to use Automations in WordPress

Make sure you have this in order to use the Automations plugin:

  1. The WordPress content you will edit: The first thing you need to know is what content you want to manage with WP Sheet Editor. This includes any third-party plugins you use to create or manage content (e.g., WooCommerce, GiveWP, LearnDash, etc.).
  2. The WP Sheet Editor plugin: Once you have decided what kind of content you want to edit with our spreadsheets, you need the right WP Sheet Editor plugin to edit the content. WP Sheet Editor is a suite of plugins that allow you to edit any post type, taxonomy term or database in an intuitive spreadsheet within WordPress. These are our spreadsheets:
    • Posts, Pages and Custom Post Types Spreadsheet: This plugin allows you to edit any WordPress post type such as courses, donations, recipes, real state, etc.).
    • WooCommerce Products Spreadsheet
    • WooCommerce Orders Spreadsheet
    • WooCommerce Coupons Spreadsheet
    • WooCommerce Customers Spreadsheet
    • WordPress Users Spreadsheet
    • Media Library Spreadsheet
    • Comments and Reviews Spreadsheet
    • Taxonomy Terms Spreadsheet
    • Custom Database Tables Spreadsheet
    • Easy Digital Downloads Spreadsheet
    • The Events Calendar Spreadsheet
    • GiveWP Spreadsheet
  3. The WP Sheet Editor – Automations add-on: This add-on works with any WP Sheet Editor spreadsheet, so you’ll be able to schedule automatic exports, imports and bulk edits for any post type and taxonomy, including custom fields added by other plugins like Advanced Custom Fields, PODS, Metabox, SEO plugins, etc.

2- Set up WordPress cron jobs

The Automations add-on uses the WordPress cron jobs system to run scheduled automatic exports, imports, bulk edits and cell changes saving.

Therefore, for Automations to work properly, you need to do two things:

a) Disable the default WP cron

WordPress has a system to schedule general tasks, called “WP Cron”. This is used by WordPress to schedule posts, etc.

By default, WordPress runs the WP cron when someone visits your website, which means that if your website doesn’t get any visitors in a few hours, the scheduled tasks will not run in those hours.

This is why you need to disable the default cron and configure a cron in your own server, which will run the scheduled tasks always at the scheduled time.

  • Go to the folder of your WordPress website.
  • Open the wp-config.php file to edit it.
  • Paste the following line of code above the line that says, “That’s all, stop editing! Happy publishing.”. Important: Please check if your file already contains this line, you will get errors if you add the line twice.
define('DISABLE_WP_CRON', true);
  • Once done, save the changes on the wp-config.php file.

b) Add a cron job on your web hosting control panel software

Note: If your hosting provider doesn’t allow or accept cron jobs or if you want to simplify this process, you can use this free service to create cron jobs. We recommend running the cron job every 1 minute.

IMPORTANT: The performance of your scheduled tasks will depend on the cron job interval that you configure. For example, let’s suppose you’re making an export that WP Sheet Editor will process in 12 batches. If your cron runs every minute, your export could finish in 12 minutes or less. But if your cron runs every hour, your export could take 12 hours instead of minutes, since every batch will run until the cron runs. If you want the best performance, your cron should run every 1-5 minutes. If you have a cheap server, you could use a cron interval of 10+ minutes.

There are a few commands that you can use for the cron job in your server. You can see some examples below, but keep in mind that those are examples and you need to edit them based on your server and website. It’s better if you ask your hosting provider to set up the cron job for you. Please only use one of the commands, don’t use multiple commands:

This command will run the WP Sheet Editor tasks only. We recommend a one or two minutes interval for the best speed. Replace /path/to/your/website with the real path of your site.

If you have a multisite network, don’t forget to add the parameter –url=http://subsite.url so WP CLI runs the command on the specific subsite where our plugins are installed. Replace http://subsite.url with your real subsite URL.

cd /path/to/your/website; wp action-scheduler run --hooks=vg_sheet_editor/scheduled/export-rows,vg_sheet_editor/scheduled/import-rows,vg_sheet_editor/scheduled/bulk-edit,vg_sheet_editor/scheduled/gs-sync,vg_sheet_editor/scheduled/rows

This is the same command as above, but this will create a log file to easily know if the cron is running correctly. You can use this for troubleshooting purposes, always use the command above when you finish troubleshooting because the log file can become very big:

cd /path/to/your/website; wp action-scheduler run --hooks=vg_sheet_editor/scheduled/export-rows,vg_sheet_editor/scheduled/import-rows,vg_sheet_editor/scheduled/bulk-edit,vg_sheet_editor/scheduled/gs-sync,vg_sheet_editor/scheduled/rows >> cronwpsheet.txt

This command will run all the scheduled tasks, including tasks scheduled by other plugins, without the log file:

cd /path/to/your/website; wp cron event run --due-now

This command will run all the scheduled tasks, including tasks scheduled by other plugins, with the log file:

cd /path/to/your/website; wp cron event run --due-now >> cronwpsheet.txt

IMPORTANT: You need to contact your hosting provider to know how to properly create cron jobs, because every server panel is different.

We have compiled a list of tutorials from the documentation of several popular hosting services. However, we recommend that you contact your hosting provider if 1) you do not find your service on this list or 2) if you need further assistance to do what your hosting provider’s documentation indicates.

If you use cPanel, follow these steps to create a new cron job:

  • In cPanel, go to Cron Jobs.
  • Add the necessary values to create a new cron job.
  • Click on Add New Cron Job.
  • Note. You still need to contact your hosting provider or check their documentation to know the values for the Command field.

WP Sheet Editor - Automations: Create a new cron job in cpanel

IMPORTANT: If you experience issues when running the scheduled tasks, you can install this free plugin created by the WooCommerce team, which will increase the number of tasks processed per cron call and it will help to clear the queues faster.

3- Install and activate the Automations extension

Now you’re ready to install and activate the WP Sheet Editor – Automations extension.

Note. This section assumes you have already installed and activated any of the WP Sheet Editor spreadsheets.

First, you need to install the Automations extension:

  • On your wp-admin dashboard, go to Plugins > Add New > Upload plugin.
  • Upload the wp-sheet-editor-automations-premium.zip file that you received after your purchase.
  • Once installed, click on Activate.

Second, you need to enter your license and click on Activate License.

WP Sheet Editor - Automations: Activate license

After activating your license, you’ll see a welcome page showing you some of the cool things you’ll be able to do with the Automations plugin:

  • Save the modified cells in the spreadsheet at a later date or in a recurring schedule
  • Run bulk edits/actions on any data set later or recurringly
  • Automatically run any export at a later date or recurringly
  • Automatically import data at a later date or recurringly
  • And more

WP Sheet Editor - Automations: Welcome page

Now that you have installed and configured the Automations add-on for WP Sheet Editor, you can start scheduling exports, imports, bulk edits, and changes made to cells.

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.