wp-cli eval-file

wp-cli can be used to execute a php file with the eval-file command.
Biggest plus; WordPress is loaded when you execute that file.
The point it will call this file is after the init action and after the later wp_loaded action.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.