You can easily regenerate thumbnails with WP-CLI, just type $ wp media regenerate --yes
in the command line.
The --yes
flag answers yes to the confirmation message.
You can easily regenerate thumbnails with WP-CLI, just type $ wp media regenerate --yes
in the command line.
The --yes
flag answers yes to the confirmation message.
$ wp search-replace '[shortcode_1]' '[shortcode_2]' wp_posts --skip-columns="post_title,post_name"
Replaces [shortcode_1]
with [shortcode_2]
from wp_posts
table and skips columns post_title
and post_name
. Add --dry-run
flag if you want to see the results without applying changes.
$ wp db export
Exports your database to databasename.sql file.
$ wp search-replace 'site1.fi' 'site2.fi'
First parameter is the old URL and second parameter is the new URL
If you want to see the report without applying changes add --dry-run
flag like in example below.
$ wp search-replace 'site1.fi' 'site2.fi' --dry-run
$ wp search-replace 'site1.fi' 'site2.fi' --url='site1'
Read more about wp search-replace
Activate theme
$ wp theme activate your_theme_name
Delete theme
$ wp theme delete your_theme_name
Install plugin
$ wp plugin install w3-total-cache
Install and activate plugin
$ wp plugin install w3-total-cache --activate
Plugins can be installed by plugin slug, path to local zip file or external URL. See more options at WP-CLI documentation
$ wp core download
You can download WordPress in your language with adding option
--locale=your_language_code
to the command. Check the list of localizations for your locale. See documentation for all the other options.
$ wp core config --dbname=your_db --dbuser=your_db_user --dbpass=your_db_password --dbhost=your_db_host
Required parameters are:
See documentation for optional parameters
$ wp core install --url="http://your_site.fi" --title="Your blog" --admin_user="admin_user_name" --admin_password="admin_pwd" --admin_email="your_email"
Required parameters are:
Now you should see a line that says
Success: WordPress installed successfully.