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.

Install Nextcloud With SSL on Synology via Docker

  1. Buy a domain and point it to your server.
    1. For Dynamic DNS, Synology offers many options including Google Domains. All options can be found in Control Panel > External Access > DDNS
    2. If you need to run a custom DynDNS option, you can use to build in Task Scheduler to automatically update any custom service via PHP. This can run every hour.
      1. To do this, you need to code your script in PHP and then in DSM, go to Control Panel > Task Scheduler > and set up your script. In Task Settings > User-defined script, enter it as:
      2. php {script_full_path}.php
  2. Use your router to forward ports 80 and 443 to your DSM’s IP. You can remove port 80 at the very end.
  3. If you haven’t already, install Docker from Package Center
  4. In Docker, in the Registry Tab, search for Nextcloud and install it. It should be named “Nextcloud” not Something/Nextcloud.
  5. Go To Docker’s Image tab and select and launch Nextcloud
  6. Name your container and jump into “Advanced Settings”.
    1. You’ll probably want to enable auto-restart
    2. Set your ports up under Port Settings. You should pick static port numbers, like
      1. Local Port: 8080 = Container Port: 80
      2. Local Port: 4433= Container Port: 443
    3. I would strongly recommend setting Volumes for your data, config and apps as described here.
    4. I’ll leave the database up to you, but I use a separate docker container with MariaDB.
    5. Now you need an SSL cert. To Use Let’s Encrypt, go to Control Panel > Security > Certificate and Add a new certificate.
    6. Next we’ll head over to Control Panel > Application Portal > Reverse Proxy and add a new rule
      1. Source:
        1. Protocol: HTTPS
        2. Hostname: your domain
        3. Port: 443
      2. Destination:
        1. Protocol: HTTP
        2. Hostname: DSM local IP address
        3. Port: Nextcloud container local port that redirects to the container port 443 (In this example, we’d use 4433)
    7. Save this and head back to Control Panel > Security > and click the Configure Button
      1. Find the “Services” with your domain name and set the certificate to that with the same name.
    8. You’re done!

Using Digital Ocean Spaces with Nextcloud

Digital Ocean Spaces fully compatible with nextcloud on either the sitewide level, or per user level.

Start by selecting Amazon s3 as an external storage engine.

Name the folder name whatever you would like. This shows up in the root of nextcloud.

In Nextcloud set the “Bucket” to the bucket name.

Set homename to {region}.digitaloceanspaces.com

Set port to “443”

Leave “Region” empty

Check “Enable SSL”

Works with or without “Enable Path style”

You’ll need to create and set a pair of keys as well.

 

Common Privacy Violations Found in Apps

Privacy is the selective sharing of information, to the people or entities you choose, at the time and in the method you opt to use.

Digital privacy is not limited to data stored in the cloud or transmitted, but data stored or displayed on your device. As desktop browsers formerly indicated in their private browsing modes, software cannot protect against someone standing behind you, or someone with physical access to your device. Continue reading “Common Privacy Violations Found in Apps”

Dark Patterns: Greed Powered Designs

Ever feel tricked or even insulted by a website, or even a physical store? Have you been asked to share a website on Facebook to hundreds of your closest and most trusted friends before you can even read the first paragraph of the article, do you feel the pressure to buy because the website says there’s a limited quantity, or feel guilty when dismissing a request to subscribe to a newsletter?

Then you are the victim of a dark pattern, created by immorally greedy corporations and unethical designers. Continue reading “Dark Patterns: Greed Powered Designs”