Skip to content

Useful WordPress functions, actions, hooks, wp-cli commands

Notifications You must be signed in to change notification settings

xenioushk/wordpress_101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Useful and frequently used WordPress functions.

WP-Cli Commands

Get wp-cli version

wp --info

Update all the themes

wp theme update --all

Create a new plugin

Navigate to wp-content/plugins/. Then run this command to create a new plugin called my-awesome-plugin.

wp scaffold plugin my-awesome-plugin

create_a_wordpress_plugin_with_wpcli

Get all the installed plugin list

wp plugin list

Update all the plugins

wp plugin update --all

Activate a plugin

wp plugin activate my-awesome-plugin

Deactivate a plugin

wp plugin deactivate my-awesome-plugin

Create an admin user

Add your username and email. The following command will return a password.

wp user create YOUR_USER_NAME your.email@example.com --role=administrator

Cron job & Transient API

Check this example code.

Acknowlegement

Releases

No releases published

Packages

No packages published

Languages