Skip to content

Instantly share code, notes, and snippets.

@midoriberlin
midoriberlin / create-config
Created July 14, 2015 10:05
Create config.php
wp core config --dbname={DATABASE NAME HERE} --dbuser={DATABASE USERNAME HERE} --dbpass={DATABASE PASSWORD HERE}
@midoriberlin
midoriberlin / download-wordpress
Created July 14, 2015 09:59
Download Latest WordPress
wp core download
@midoriberlin
midoriberlin / make-wordpress-folder
Created July 14, 2015 09:56
Create Local WordPress Folder
mkdir my-wp-cli-site
cd my-wp-cli-site
@midoriberlin
midoriberlin / wp-update
Created July 14, 2015 08:42
WP-CLI - Update WordPress
wp core update
@midoriberlin
midoriberlin / export-database
Created July 14, 2015 08:23
WP-CLI - Export Database
wp db export
@midoriberlin
midoriberlin / check-wp-version
Created July 14, 2015 08:12
WP-CLI - Check WordPress Version
$wp core version --extra
@midoriberlin
midoriberlin / import-base-styles
Created April 20, 2015 07:00
Import base styles to WordPress editor stylesheet
@import url( 'my-style.css' );
/* Add overwrites as needed so that the content of the editor field is attractive and not broken */
body { padding: 0; background: #fff; }
@midoriberlin
midoriberlin / image-border-test
Created April 20, 2015 06:58
Add pink image border
#tinymce img {
border: 25px solid #DA55AB;
}
@midoriberlin
midoriberlin / style-header-test
Created April 20, 2015 06:57
Style header green
h1,
h2,
h3,
h4,
h5,
h6 {
clear: both;
color: #BADA55;
font-weight: 700;
margin: 56px 0 28px;
@midoriberlin
midoriberlin / connect-custom-editor-style
Last active August 29, 2015 14:19
Connecting the WordPress post editor to your custom stylesheet
// Connect the WordPress post editor to your custom stylesheet
function my_theme_add_editor_styles() {
add_editor_style( 'custom-editor-style.css' );
}
add_action( 'admin_init', 'my_theme_add_editor_styles' );