This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################## | |
# WP-cli | |
########################################## | |
ALIASES | |
########################################## | |
alias wpcdl=wp_core_download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# USE FOR LOCAL DEVELOPMENT ONLY!!! | |
# | |
EMAIL='[email protected]' | |
MYSQL=`which mysql` | |
echo -n "DB user/name for project (lowercase) [ENTER]:" | |
read DB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wp-cli | |
complete -c wp -l cache --description 'Manage the object cache.' | |
complete -c wp -l cap --description 'Manage user capabilities.' | |
complete -c wp -l cli --description 'Get information about WP-CLI itself.' | |
complete -c wp -l comment --description 'Manage comments.' | |
complete -c wp -l core --description 'Download, install, update and otherwise manage WordPress proper.' | |
complete -c wp -l cron --description 'Manage WP-Cron events and schedules.' | |
complete -c wp -l db --description 'Perform basic database operations.' | |
complete -c wp -l eval --description 'Execute arbitrary PHP code.' | |
complete -c wp -l eval-file --description 'Load and execute a PHP file.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Source: https://indigotree.co.uk/automated-wordpress-installation-cmd/ | |
:: STEPS: | |
:: 1. Install wp-cli | |
:: 2. Install composer | |
:: 3. Install MySQL | |
:: 4. Configure wp-cli at System PATH | |
:: 5. Configure composer at System PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_order_number', 'jm_woocommerce_order_number', 1, 2 ); | |
/** | |
* Remove # prefix from WooCommerce Order Number | |
* Could also be done with gettext: https://github.com/woothemes/woocommerce/blob/master/includes/abstracts/abstract-wc-order.php#L537 | |
* | |
*/ | |
function jm_woocommerce_order_number( $oldnumber, $order ) { | |
return str_replace('#', '', $order->id); | |
} |
- Initial Server Setup with Ubuntu 12.04
- How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 12.04
- A Basic MySQL Tutorial
- How To Install phpMyAdmin on a LEMP server
- How To Install Git on Ubuntu 12.04
- Generating SSH Keys and connect with DigitalOcean
- Fix IPv4 fallback for apt-get
- [Install Composer on DigitalOcean](ht
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Download WordPress within folder: | |
wp core download | |
// Create database via Terminal | |
// login local with root | |
mysql -u root -p | |
// create database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `wp-db-here`.`wp_users` | |
(`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`, `display_name`) | |
VALUES | |
('1000', 'tempadmin', MD5('!YourPassword5150'), 'tempuser', '[email protected]', '0', 'Temp Admin'); | |
INSERT INTO `wp-db-here`.`wp_usermeta` | |
(`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES | |
(NULL, '1000', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'); |