WP-CLI - Execute Arbitrary PHP Code

wp eval 'echo WP_CONTENT_DIR;' : ' /vagrant/site/wp-content ' # Execute code without loading WordPress. wp eval 'echo WP_CONTENT_DIR;' --skip-wordpress : ' WP_CONTENT_DIR '

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.