Prerequisites
Describe the bug
When testing the RunPHPStep example and selecting Try it out, the step executes successfully but the browser console shows a warning about using a relative path to load wp-load.php. The example currently uses:
require_once 'wordpress/wp-load.php';
This works temporarily because Playground rewrites the path, but the warning states that path rewriting will be removed in the future.
Expected behavior
The example blueprint should use an absolute path so that it runs without console warnings and remains compatible with the updated Playground directory structure.
Actual behavior
The console shows this warning:
It looks like you're trying to load WordPress using a relative path 'wordpress/wp-load.php'.
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
how real web servers work. This means relative paths that used to work may no longer
point to the correct location.
Playground automatically updated the path for you, but at one point path rewriting will be removed.
Please update your code to use an absolute path instead:
Instead of: require_once 'wordpress/wp-load.php';
Use: require_once '/wordpress/wp-load.php';
Steps to reproduce
- Go to the RunPHPStep documentation page.
- Click Try it out on the provided example.
- Observe the browser console β the code runs, but the warning appears about the relative path.
- Update the example blueprint to:
{
"steps": [
{
"step": "runPHP",
"code": "<?php require_once '/wordpress/wp-load.php'; wp_insert_post(array('post_title' => 'wp-load.php required for WP functionality', 'post_status' => 'publish')); ?>"
}
]
}
This fixes the warning and ensures future compatibility.
Isolating the problem