Archives Recipes

Recipe

Backing Up WordPress Site Over SSH

Paste the following into terminal while connected over SSH. Now run backup <folder-name>/. Make sure to target the folder where WordPress lives like backup public/ or backup htdocs/. This will generate a full backup with a link to download it.

Realtime Monitor Kinsta Access Logs

Create ~ with the following. Then chmod +x ~ to grant execute permissions and ~ to run. This will continuously monitor Kinsta’s access logs and show realtime activity for the top IPs. To exit press Command + C.

Deactivate WordPress

Injects mu-plugin deactivate-wp.php which turns off front end of WordPress. Customize header, description and message variables at the top before running. To re-enable simply remove the mu-plugin.

Fetch database autoload size

Generally a good idea to keep your database autoload below 1MB in size. You can see the current usage with the following. For optimizing, I recommend reviewing Kinsta’s guide: