Skip to content

Instantly share code, notes, and snippets.

@praveen-palanisamy
praveen-palanisamy / wp-backup-script.sh
Created August 19, 2018 16:25
WordPress backup script: A bash script to compress and backup a complete wordpress site including the database
#!/usr/bin/env bash
# wp-backup-script.sh - Creates a complete, compressed backup of your WordPress database and files. You can then transfer it to your preferred location (local disk, cloud backup storage etc)
# Author: Praveen Palanisamy | Twitter: @PraveenPsamy | GitHub: https://github.com/praveen-palanisamy| Website: https://praveenp.com
# Dependencies: mailutils
# 0. Change the variables below to suit your environment
WP_FOLDER="$HOME/public_html/" # Folder where your wordpress root installation is
BACKUP_FOLDER="$HOME/backups" # Folder where you want to store the backups
@butlerblog
butlerblog / functions.php
Last active March 28, 2024 02:09
SMTP using wp-config.php for settings #smtp #wp_mail
<?php // Don't use this line.
/*
* Add the script below to wherever you store custom code snippets
* in your site, whether that's your child theme's functions.php,
* a custom plugin file, or through a code snippet plugin.
*/
/**
* This function will connect wp_mail to your authenticated
@bekarice
bekarice / filter-wc-orders-by-gateway.php
Last active August 3, 2023 13:37
Filters WooCommerce Orders by Payment Gateway Used
<?php
/**
* Plugin Name: Filter WooCommerce Orders by Payment Method
* Plugin URI: http://skyverge.com/
* Description: Filters WooCommerce orders by the payment method used :)
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: wc-filter-orders-by-payment
*
@hofmannsven
hofmannsven / README.md
Last active October 6, 2023 21:05
Storing WordPress files and database with WP-CLI on the server.

WordPress Backups with WP-CLI