This file contains hidden or 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 search-replace '\[\/?et_pb.*?\]' '' --regex |
This file contains hidden or 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
| <?php | |
| /** | |
| * Import Specs CLI | |
| * | |
| * @subcommand specs | |
| * | |
| * ## EXAMPLES | |
| * | |
| * wp import file | |
| * |
This file contains hidden or 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
| let express = await npm('express') | |
| let parseLinkHeader = await npm('parse-link-header') | |
| //≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡ | |
| // ✅ Database | |
| //≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡ | |
| let basecampDb = db("basecamp", { | |
| client_id: null, |
This file contains hidden or 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
| let express = await npm('express') | |
| //≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡ | |
| // ✅ Database | |
| //≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡ | |
| let zoomDb = db("zoom", { | |
| client_id: null, | |
| client_secret: null, |
This file contains hidden or 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
| # Optional Local Debug | |
| # wp config set WP_DEBUG true --raw | |
| # wp config set WP_DEBUG_DISPLAY false --raw | |
| # wp config set WP_DEBUG_LOG true --raw | |
| # Setup defaults | |
| wp post create --post_type=page --post_title=Home --post_status=publish --post_author=1 | |
| wp option update show_on_front 'page' | |
| wp option update page_on_front $(wp post list --post_type=page --post_status=publish --posts_per_page=1 --pagename=home --field=ID --format=ids) | |
| wp option update blogdescription '' |
This file contains hidden or 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
| function custom_display_post_states( $states, $post ) { | |
| $note = get_post_meta($post->ID, 'MY_META_FIELD_HERE', true); | |
| if ( $note && !isset($states['note']) ) { | |
| $states['note'] = $note; | |
| } | |
| return $states; | |
| } | |
This file contains hidden or 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
| mkdir db | |
| wp db export db/backup.sql && | |
| wp @production db export - > db/latest-db.sql && | |
| wp db import db/latest-db.sql && | |
| wp option set blog_public 0 |
This file contains hidden or 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
| # Single Site | |
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
| RewriteRule ^(.*)$ http://PRODUCTIONSITE/$1 [QSA,L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d |