Skip to content

Instantly share code, notes, and snippets.

@LehtinenRiku
Created July 15, 2017 12:14
Show Gist options
  • Save LehtinenRiku/8dddb9d80004a6409deb849d6ed32807 to your computer and use it in GitHub Desktop.
Save LehtinenRiku/8dddb9d80004a6409deb849d6ed32807 to your computer and use it in GitHub Desktop.
Install Wordmove
#!/usr/bin/env bash
set -xu
RUBY_VERSION=2.4.1
LIBSSL_VERSION=$(dpkg -s libssl1.0.0 | grep -i ^version | awk '{print $2;}')
apt-get update -y
apt-get upgrade -y
apt-get install -y software-properties-common python-software-properties vim build-essential git python-setuptools ruby-build libssl-dev=${LIBSSL_VERSION}
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv install ${RUBY_VERSION}
rbenv global ${RUBY_VERSION}
export RBENV_VERSION=${RUBY_VERSION}
gem install wordmove
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
wp cli update
cd /var/www/html
wordmove init
ln -s /var/www/Movefile /Movefile
cd /
kill -9 $(pidof /bin/bash)
@LehtinenRiku
Copy link
Author

LehtinenRiku commented Jul 15, 2017

Was having problems installing all necessary dependencies for Wordmove so adapted this just a little https://gist.github.com/kuck1u/697424982a9124c4f108e058f996d71f (only changed the folder where Movefile will be created)

To use it, move wordmove.sh to your WP folder and: bash wordmove.sh
Before running it, make sure lines 25 and 27 match to your projects structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment