Closed joeguilmette closed 8 years ago
mkdir wp-content/mu-plugins
curl -sS https://downloads.wordpress.org/plugin/wp-local-toolbox.zip > wp-content/mu-plugins/wp-local-toolbox.zip
unzip -q wp-content/mu-plugins/wp-local-toolbox.zip -d wp-content/mu-plugins/
rm wp-content/mu-plugins/wp-local-toolbox.zip
mv wp-content/mu-plugins/wp-local-toolbox/* wp-content/mu-plugins/
rm -rf wp-content/mu-plugins/wp-local-toolbox/
mv wp-content/mu-plugins/read* wp-content/mu-plugins/toolbox/
mv wp-content/mu-plugins/LICENSE wp-content/mu-plugins/toolbox/LICENSE
# I'm pretty sure we sent a man to the moon with fewer lines of code
# than it takes me to unpack a zip file. Whatever. It works.
# WPLT configuration
sed -i "3i/** WP Local Toolbox config */" wp-config.php
sed -i "4idefine('WPLT_SERVER','local');" wp-config.php
sed -i "5idefine('WPLT_ADMINBAR','always');" wp-config.php
sed -i "6idefine('WPLT_AIRPLANE','true');" wp-config.php
this just ate my mu-plugin reader.php! ok, not really, but we should probably play it safe and not wildcard that.
I always install manually in mu-plugins, but I'll give this a try.
Ok, so it moved the plugin just fine, BUT it exploded on the SED stuff. It created a p-config.php file....
Hmmm I lifted this from my vvv-init.sh, so it works in 14.04, but I guess not OSX.
I'll play with it later and make it play nicer in unknown environments. Like looking for mu-plugins first, explicitly moving stuff without wildcards, etc.
Cool, thanks Jon! On Tue, Aug 11, 2015 at 7:58 PM Jon Brown notifications@github.com wrote:
Ok, so it moved the plugin just fine, BUT it exploded on the SED stuff. It created a p-config.php file....
[image: 2015-08-11 at 2 58 pm] https://cloud.githubusercontent.com/assets/801241/9214442/686c7f8c-4039-11e5-9ce1-0a374e809ff8.png
— Reply to this email directly or view it on GitHub https://github.com/joeguilmette/wp-local-toolbox/issues/15#issuecomment-130126318 .
We should have a one liner to install WPLT as an mu-plugin