The first thing to do is to install Git on the remote server.
Once you do that the rest of the process is split into three sections:
- Server set-up
- Local set-up (push commits)
- Server (pull commits)
| /** | |
| * Optimize WooCommerce Scripts | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag | |
| remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
| body { | |
| --base: 20; | |
| --scale-headings: 1.44; | |
| --scale-mobile: 0.7; | |
| --scale-mobile-headings: 0.4; | |
| --scale-icons: 1.4; | |
| --min-viewport: 480; | |
| --max-viewport: 1600; | |
| --max-size: var(--base); | |
| } |
| git init | |
| git remote add origin PATH/TO/REPO | |
| git fetch | |
| # git checkout -t origin/master | |
| git reset origin/master |
| class Text_Editor_Custom_Control extends WP_Customize_Control | |
| { | |
| public $type = 'textarea'; | |
| /** | |
| ** Render the content on the theme customizer page | |
| */ | |
| public function render_content() { ?> | |
| <label> | |
| <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> | |
| <?php |
| UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
| hdiutil makehybrid -o ~/Desktop/image.iso ~/path/to/folder/to/be/converted -iso -joliet |
| <?php | |
| echo 'Current PHP version: ' . phpversion(); | |
| echo phpversion('tidy'); // if the extension isn't enabled |
| function move_to_top(&$array, $key) { | |
| $temp = array($key => $array[$key]); | |
| unset($array[$key]); | |
| $array = $temp + $array; | |
| } | |
| function move_to_bottom(&$array, $key) { | |
| $value = $array[$key]; | |
| unset($array[$key]); | |
| $array[$key] = $value; |