Last active
August 29, 2015 14:20
-
-
Save chrisguitarguy/3f460c2b5d4b1fef78b3 to your computer and use it in GitHub Desktop.
Code for a blog post at https://www.pmg.com/blog/composer-and-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
| RewriteEngine on | |
| RewriteRule ^composer\.(lock|json)$ - [F,L] | |
| RewriteRule ^vendor/.*$ - [F,L] |
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": "pmg/composer-wp-example", | |
| "description": "Getting start with WordPress and Composer", | |
| "license": "MIT", | |
| "repositories": [ | |
| { | |
| "type":"composer", | |
| "url":"http://wpackagist.org" | |
| } | |
| ], | |
| "require": { | |
| "php": ">=5.5", | |
| "johnpbloch/wordpress-core-installer": "0.2.0", | |
| "johnpbloch/wordpress": "~4.2", | |
| "composer/installers": "~1.0", | |
| "wpackagist-plugin/wordpress-seo": "~2.1" | |
| }, | |
| "extra": { | |
| "wordpress-install-dir": "wp", | |
| "installer-paths": { | |
| "content/plugins/{$name}": ["type:wordpress-plugin"], | |
| "content/themes/{$name}": ["type:wordpress-theme"], | |
| "content/mu-plugins/{$name}": ["type:wordpress-muplugin"] | |
| } | |
| } | |
| } |
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": "pmg/composer-wp-example", | |
| "description": "Getting start with WordPress and Composer", | |
| "license": "MIT", | |
| "require": { | |
| "php": ">=5.5", | |
| "johnpbloch/wordpress-core-installer": "0.2.0", | |
| "johnpbloch/wordpress": "~4.2" | |
| }, | |
| "extra": { | |
| "wordpress-install-dir": "wp" | |
| } | |
| } |
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": "pmg/composer-wp-example", | |
| "description": "Getting start with WordPress and Composer", | |
| "license": "MIT", | |
| "repositories": [ | |
| { | |
| "type":"composer", | |
| "url":"http://wpackagist.org" | |
| } | |
| ], | |
| "require": { | |
| "php": ">=5.5", | |
| "johnpbloch/wordpress-core-installer": "0.2.0", | |
| "johnpbloch/wordpress": "~4.2", | |
| "composer/installers": "~1.0" | |
| }, | |
| "extra": { | |
| "wordpress-install-dir": "wp", | |
| "installer-paths": { | |
| "content/plugins/{$name}": ["type:wordpress-plugin"], | |
| "content/themes/{$name}": ["type:wordpress-theme"], | |
| "content/mu-plugins/{$name}": ["type:wordpress-muplugin"] | |
| } | |
| } | |
| } |
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
| server { | |
| host yoursite.com | |
| # ... | |
| location ~ ^/composer\.(json|lock) { | |
| return 401; | |
| } | |
| location /vendor { | |
| return 401; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment