-
Use –precise if wp search-replace does not get all matches
I just discovered that you can add the –precise flag when using wp search-replace with WP-CLI. I’ve never needed to use this before, so I wouldn’t suggest using it by default, but I had a site that was stubbornly refusing to replace all instances of a test domain after switching to the production domain and…
-
Reset WordPress permalinks via WP-CLI
wp rewrite flush To save having you to do it via Settings > Permalinks… Source: https://developer.wordpress.org/cli/commands/rewrite/
-
Change post type for WordPress posts with WP-CLI
In this example, I’m modifying all the posts with a legacy custom post type that I want to get rid of to use the Yoast SEO: Local custom post type for locations instead.
-
Run WP-CLI commands on Pagely without errors from PHP version
I hit an issue on Pagely where I was running a WP-CLI command – via SSH – but I kept hitting a PHP fatal error. When I looked into the error it was because the site was running PHP 7.4, but WP-CLI on Pagely was running PHP 7.3 so my code was breaking on the…
-
Website not loading after clone in WP Engine control panel
If this happened to you like it did to me don’t assume – like I did – that WP Engine’s clone tool does a search and replace on your database to update the URL too. Instead, when I spoke to WP Engine support they suggested it had to be done as a separate step. Me:…