Created
February 21, 2026 18:17
-
-
Save superpowered/49322d97a7a14de0e10921bfdc109db6 to your computer and use it in GitHub Desktop.
Use Node package.json to install / update WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "my-wordpress-project", | |
| "description": "Downloads/updates a blank wordpress project, wpVersion to define version", | |
| "config": { | |
| "wpVersion": "6.9.1" | |
| }, | |
| "scripts": { | |
| "wp:remove": "rm -rf wordpress-*.zip wp-admin wp-includes xmlrpc.php index.php && rm -rf `find wp-*.php ! -name 'wp-config.php' ! -name 'wp-config-ddev.php'`", | |
| "wp:install": "npm run wp:remove && curl -O \"https://wordpress.org/wordpress-$npm_package_config_wpVersion.zip\" && unzip -o wordpress-$npm_package_config_wpVersion.zip && rm -rf wordpress/wp-content && mv wordpress/* . && rm -rf wordpress wordpress-$npm_package_config_wpVersion.zip", | |
| "postinstall": "npm run wp:install" | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment