-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wp-env: file permissions issues with rewrites and uploads #28201
Comments
I think there are permission issues when the WordPress version is specified using the |
Interesting finding, thanks for sharing! That will make debugging hopefully a tad easier. |
I'm guessing that rewriting the URL format is related to the line in the documentation which says "To regenerate a .htaccess file with WP-CLI, you’ll need to add the mod_rewrite module to your WP-CLI config." it could also be due to the wp-cli being a separate service from the one which serves requests. Re: image uploads. I'm currently able to upload images to both the dev and tests image in the editor and in the media library using the .wp-env.json in this repo. Could you share yours? I wonder if a difference there is causing the problem. |
#30053 also fixed some permissions issues, so it'd be worth re-testing file upload. (The URL format is still broken though.) |
I'm also experiencing this issue It works fine with v4.0.4 but after updating my global version of @wordpress/env to 5.10.0 none of my API testing is working as .htaccess is not writeable. When the docker container is spun up, the whole of the WordPress folder has my user as the owner, rather than using www-data as the owner for the folders. It looks like the I'm not using a custom "core" in wp-env.json, just a couple of mappings. Also tested this out on a seperate folder without a wp-env.json file, so it would use the base setup and it still can't write to .htaccess in the container as the owner is my user rather than www-data. So even simple APIs such as /wp-json/wp/v2/posts don't work atm with wp-env for me. |
This should be solved by #49962. You'll be able to see the change it when developing Gutenberg directly (since |
Description
It seems like it's not possible to use pretty permalinks with wp-env and/or upload files; at least ffor the tests container.
Step-by-step reproduction instructions
npm run wp-env run tests-cli "wp rewrite structure '/%postname%'"
Expected behaviour
Actual behaviour
Screenshots or screen recording (optional)
Code snippet (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: