Skip to content

Instantly share code, notes, and snippets.

wp core install --url={THE DOMAIN} --title={SITE TITLE} --admin_user={ADMIN USERNAME} --admin_password={ADMIN PASSWORD} --admin_email={ADMIN EMAIL}
wp core config --dbname={DATABASE NAME HERE} --dbuser={DATABASE USERNAME HERE} --dbpass={DATABASE PASSWORD HERE}
wp core download
mkdir my-wp-cli-site
cd my-wp-cli-site
wp core update
$wp core version --extra
wp help db export
add_filter( 'the_content', 'show_diary_details' );
function show_diary_details( $content ) {
$diary = '';
if( has_category( 'workout' ) ) {
$diary = '<table>
<tr>
<th>Activity</th>
<th>Duration</th>
<th>Distance</th>
add_filter( 'the_content', 'show_diary_details' );
function show_diary_details( $content ) {
$diary = '';
if( has_category( 'workout' ) ) {
$diary = '<table>
<tr>
<th>Activity</th>
<th>Duration</th>
<th>Distance</th>