Azure / Azure/azure-quickstart-templates
Initial php configuration does not allow HTTP verbs PUT and DELETE
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
## Issue Details
PHP setup blocks HTTP verbs used by the WP REST API
We are finalizing a migration into azure, replacing all existing websites with WordPress sites.
We discovered WPAPI on npm, and were hoping to automate many processes, but updating posts after creation was failing due to `Method not allowed` error when the library tried to use the verb PUT. We also discovered the same was true for DELETE
## Suggested resolution
Include an option during setup to allow more HTTP verbs. If input is yes, modify the web.config file to allow them.
## Workaround
These can be exposed by adding the following to the web.config file, AFTER setting WordPress to use pagename routes. My final results:
```
```
Please note that PHP72 references PHP 7.2, and should be modified if you are using a different php version
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the PHP/WordPress setup that generates web.config; no repository file or entry point is named in the issue. Compare its handler configuration with the provided workaround, then verify that an opt-in setup permits PUT and DELETE without breaking existing routes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, php, wordpress
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100