You can try to load the wp-load.php of wp-config.php files manually, but then some defines are not set (like HTTP_HOST). An easier way is to use the eval-file method of the wp-cli package. No you can just do: And in your file, you can call all the usual WordPress methods. Only make sure to explicitly […]