Skip to main content
GrN.dk

Main navigation

  • Contact
  • Your Digital Project Manager
  • About Greg Nowak
  • Services
  • Portfolio
  • Container
    • Excel Freelancer
    • Kubuntu - tips and tricks
    • Linux Apache MySQL and PHP
    • News
    • Image Gallery
User account menu
  • Log in

Breadcrumb

  1. Home

WP CLI Tips And Tricks

Rename wordpress database prefix (https://iandunn.name/2016/07/21/rename-wordpress-database-prefix-with-w…)

Change site URL:

wp search-replace 'example.dev' 'example.com' --skip-columns=guid
Or, if you only want to change the option, you can do:

wp option update home 'http://example.com'
wp option update siteurl 'http://example.com'

Install and activate plugin example: wp plugin install really-simple-ssl --activate

Check users: wp user list

Reset password: wp user update USERNAME --user_pass="PASSWORD" (https://developer.wordpress.org/cli/commands/user/reset-password/)

Update user e-mail: sudou.bash wp user update USERNAME --user_email=EMAIL

Reset database: wp db reset --yes (https://developer.wordpress.org/cli/commands/db/reset/)

Import database: wp db import wordpress_dbase.sql

Delete all inactive themes: https://guides.wp-bullet.com/autodelete-unused-inactive-wordpress-theme…

Delete all inactive plugins and themes: https://github.com/wp-cli/wp-cli/issues/1954

Flush all: https://wordpress.stackexchange.com/questions/358362/how-to-remove-all-…

Delete cache: wp cache flush

Delete hummingbird cache: rm -r /home/www/example.com/wp-content/wphb-cache/cache

Genereal wp-cli Documentation

https://developer.wordpress.org/cli/commands/ and https://wp-cli.org/

Last modified
2021-10-07

Tags

  • wordpress

Review Greg on Google

Greg Nowak Google Reviews

 

  • Portfolio
  • About Greg Nowak
  • Gregs IT and Logistics Optimization
  • Shrink PDF In Linux
  • Running Linux on T450s T495s T14, Thinkpads and Others
RSS feed

GrN.dk web platforms, web optimization, data analysis, data handling and logistics.