Open sejas opened 11 months ago
A workaround until this is fixed is running php step:
{
"landingPage": "/friends/",
"steps": [
{
"step": "runPHP",
"code": "<?php include '/var/www/html/wp-load.php'; update_option('permalink_structure', '/%year%/%monthnum%/%day%/%postname%/');"
}
]
}
cc @reimic – you might want to take a look at this one
Gladly, I am in the process of writing unit tests for all steps. I'll prioritize the site-data steps, of which SetSiteOptionsStep is one.
Description
I've found some users
setSiteOptions
blueprint step onwp-now
get some errors due thedocumentRoot
being hardcoded instead of reading the value fromhttps://github.com/WordPress/wordpress-playground/blob/45233583e635f35c0751b5340dfa07102eabbc46/packages/playground/blueprints/src/lib/steps/site-data.ts#L37
Can we make the
Steps to reproduce
blueprint.json
with this contentnpx @wp-now/wp-now start --blueprint=blueprint.json
Error: Failed to run code:
Warning: include(wordpress/wp-load.php): Failed to open stream: No such file or directory in php-wasm run script on line 2
Warning: include(): Failed opening 'wordpress/wp-load.php' for inclusion (include_path='.:') in php-wasm run script on line 2
Fatal error: Uncaught Error: Call to undefined function update_option() in php-wasm run script:5 Stack trace:
0 {main}
thrown in php-wasm run script on line 5
PHP Warning: include(wordpress/wp-load.php): Failed to open stream: No such file or directory in php-wasm run script on line 2 PHP Warning: include(): Failed opening 'wordpress/wp-load.php' for inclusion (include_path='.:') in php-wasm run script on line 2 PHP Fatal error: Uncaught Error: Call to undefined function update_option() in php-wasm run script:5 Stack trace:
0 {main}
thrown in php-wasm run script on line 5
Node.js v20.8.1