If you don’t want to deal with the messy process of loading WordPress manually, you can just use WP-CLI’s eval-file
command:
wp eval-file my-script.php
If you don’t want to deal with the messy process of loading WordPress manually, you can just use WP-CLI’s eval-file
command:
wp eval-file my-script.php