Create Offsite WordPress Database Backup with WP-CLI and CURL/FTP

WP-CLI is a crazy powerful tool for automating WordPress tasks, but did you know you can add a bit of curl to it to automate offsite backups?

In a quick script, which requires a bit of editing to be usable, shows how you can export the filename to a bash variable and use that variable to upload the file to a remote FTP server.

To make this script usable, either load it from your wordpress directly, or uncomment and adjust the cd command, and then replace HOSTNAME with your FTP hostname and replace USERNAME and PASSWORD with your credentials.

If you’re FTP server doesn’t support FTP-SSL, remove –ftp-ssl, but I would strongly advise keeping this on, as this is your WordPress database and may contain sensitive information.

Import a Spreadsheet Into GoToWebinar

GoToWebinar does not offer an import option for registrations, which can be limiting.

I have come up with the quickest and easiest way to mass-import registrants from anything from a CRM to an email marketing platform, to manually, or even from a simple website contact form.

Note: This is not free. It requires a paid Zapier.com plan and access to any free google account. Right now the smallest plan is $20 a month – but completely worth it, and offers a 14 day free trial.

Before you begin

You will need to have your webinar setup on GoToWebinar, and have a paid or trial account with Zapier

Step 1: Set up a Google Spreadsheet

Set up the first row as your headers, one for each registration field from GoToWebinar. If you are not using custom fields, you need at minimum, a column for First NameLast Name, and Email. If you have additional fields, both select from GoToWebinar’s custom registration question questions, or custom questions, enter each one as a column.

Note: if some of your users may not have a certain piece of information, you should mark that field as not required in GoToWebinar, at least for the duration of this import. 

Once all of your columns are set up, add one more called “Update Flag“. We’ll come back to this.

Step 2: Enter Your Data

If you are importing your data from a CSV/Excel file, I would recommend making a copy of that data and then deleting unused columns, and adjusting the order of columns until they match your column headers in Google Sheets.

If you are manually entering data, enter your information in the appropriate columns.

Note: I would strongly recommend adding yourself and some fellow staff members at the top

Once you wrap entering your data, set the value for  all rows with data in the Update Flag column to any single character you want, such as “-” or “N”

Step 3: Creating Your Zap(ier Action)

Now it’s time to create a Zap – a Zapier action. Zaps consist, at a minimum, of a trigger from one connected service.  In this case, Google Sheets will provide the Trigger, while GoToWebinar will be the destination of the action.

Create a zap and select Google Sheets. For the trigger, select “New or Updated Spreadsheet Row”.

Next, follow the on screen instructions to give Zapier access to a Google Account with access to this Google Sheet.

On the next page, “Edit Options”, select your spreadsheet and worksheet.

For trigger Column, you can, either leave this as “any_column” or select the column called Update Flag.

At this point, Zapier will need an Action step. Select GoToWebinar and select the action “Create Registrant”.

Zapier will need access your GoToWebinar account now.

In the “Edit Options”, select the your webinar of choice from the “Upcoming Webinar” field.

For each of the additional fields, either type in the value to be assigned to all registrants – such as the “Source” field, or use searchable select to choose the matching field. Each searchable select box (Field) is a registration question from GoToWebinar, while the values in the dropdown are the columns from Google Sheets.

Note: I would recommend you make sure the sample data is your own information. You may need to reload samples from Google Sheets and/or move the row in Google Sheets with your information to the top or bottom of the list until your information is pulled in a sample.

When the matching is completed, you can continue onto “Test This Step”.

If the test is successful, GoToWebinar will return several key/value pairs, at minimum a “registrantKey” and “joinUrl”.

This means everything worked. I would recommend confirming all rows are properly mapped in GoToWebinar.

Turn on the Zap and we’re ready to import your data.

Step 4: Trigger the Zap

Again, I would recommend having a second row of test data, possibly another employee or a section email address. GoToWebinar will allow you to delete registrants if needed.

Find a row you want to test on and change the Update Flag column value for that row. I would recommend just simply changing it to “Y”.

It may take up to 20 minutes, but the information in that row should have mapped to GoToWebinar. If everything worked, change the value of Update Flag in every row and all rows will be shortly imported into GoToWebinar.