-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-cli_main-commands.txt
72 lines (50 loc) · 1.82 KB
/
wp-cli_main-commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
EDIT wp_options TABLE DATA:
wp option update home 'http://example.com'
wp option update siteurl 'http://example.com'
wp option get siteurl
CREATE CPT or TAXONOMY:
wp scaffold post-type example --label=Example --theme=sitename_theme_dev
wp scaffold taxonomy tax_name --post_types=example --theme=sitename_theme_dev
GENERATE DUMMY DATA (PAGES OR POST TYPES):
wp post create --post_title='My Notes' --post_content='Just My Notes.' --post_type=page --post_status=publish
wp term generate esempio-taxonomy --count=12
wp post generate --count=5 --post_type=esempio --post_date=yyyy-mm-dd
wp post update <id> --post_content="Post content Example"
wp post list --term=category-1 --post_status=publish
wp post delete <id> --force
wp post delete $(wp post list --post_type=news --format=ids) --force → delete all "news" post types
wp post meta list ${post_id}
wp post meta add key=example value=”Example value”
REGENERATE ALL THUMBNAILS:
wp media regenerate --yes
CHANGING POST OR PAGE TEMPLATE:
wp post update 4 --page_template='new-home.php'
PLUGINS:
wp plugin list
wp plugin install advanced-custom-fields jetpack ninja-forms --activate
wp plugin search searchterm
wp plugin deactivate wordpress-seo
wp plugin deactivate --all
wp plugin list --skip plugins
wp plugin status
wp plugin update wordpress-seo
wp plugin update –-all
IMPORT/EXPORT DATABASE:
wp search-replace “http://www.esempio.com” “https://www.esempio.com”
wp search-replace sitename_theme_dev” sitename_theme”
wp db export
wp db import file.sql
config.php FILE:
wp config get
CORE UPDATE:
wp core update
USERS:
wp user list
wp user reset-password username
WP CRON:
wp cron event list
MEDIA:
wp help media
wp media image-size
EMPTY ALL SITE CONTENT (uploads FOLDER INCLUDED), BUT NOT THE SETTINGS:
wp site empty – uploads