Skip to content
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

Create easy, remote CLI install script #15

Closed
joeguilmette opened this issue Aug 11, 2015 · 4 comments
Closed

Create easy, remote CLI install script #15

joeguilmette opened this issue Aug 11, 2015 · 4 comments
Assignees
Milestone

Comments

@joeguilmette
Copy link
Owner

We should have a one liner to install WPLT as an mu-plugin

@joeguilmette
Copy link
Owner Author

    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

@jb510
Copy link
Collaborator

jb510 commented Aug 12, 2015

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.

@jb510
Copy link
Collaborator

jb510 commented Aug 12, 2015

Ok, so it moved the plugin just fine, BUT it exploded on the SED stuff. It created a p-config.php file....
2015-08-11 at 2 58 pm

@joeguilmette
Copy link
Owner Author

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
#15 (comment)
.

@joeguilmette joeguilmette added this to the 1.3 milestone Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants