wp-cli for Creating page-template

wp-cli is not a development tool, it is a server admin tool, as such all the scaffold stuff there is…. for lack of better word, unneeded bloat. It is unlikely to reflect best practice, especially if your copy is old. In the specific case of page templates, there is really nothing worth “scaffolding” the easiest … Read more

Get plugin download URL from slug

I forget exactly if the plugin slug is a reliable method to get the url, it might be in most cases but not all due to how plugins are named. You can query the api @wordpress.org for the plugins xml file which also contains the download link. For example: $plugin_slug = ‘akismet’; $return_plugin_info = “http://api.wordpress.org/plugins/info/1.0/$plugin_slug.xml” … Read more

How can I list all installed plugins/themes/versions from CLI/API?

Using WP CLI, you can record WordPress version using: wp core version –extra –path=”$SITEPATH” > wp-report.txt and append a list of plugins (with status and version): wp plugin list –path=”$SITEPATH” >> wp-report.txt and append a list of themes (with status and version) using: wp theme list –path=”$SITEPATH” >> wp-report.txt Further reading: https://developer.wordpress.org/cli/commands/core/version/ https://developer.wordpress.org/cli/commands/plugin/list/ https://developer.wordpress.org/cli/commands/theme/list/

Running custom defined WP-CLI commands without WordPress installation present

This may be helpful. http://wp-cli.org/blog/how-wp-cli-loads-wordpress.html This is what actually wp-cli tries. $_SERVER[‘HTTP_HOST’] = ‘example.com’; define(‘WP_ADMIN’, true); require(‘wordpress/wp-load.php’); You must have these WordPress files files and the database. So the answer is NO unless you create hack. I am not aware of any. If you pass: $ wp make:a.txt –skip-wordpress Error: This does not seem to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)