-
Notifications
You must be signed in to change notification settings - Fork 3
Creating a wordpress development environment with Subutai
- Logged in on the hub.
- Click "Environments".
- Click on "Create Environment". Click the checkbox in one peer from my Favorites.I find the "Next" button on the top right and click it.
- I'll start with an ubuntu16 image. I click it twice to have one in each Peer. Name it.
- Success! Click "Build" and wait for the magic to happen.
- After environment is healthy, I SSH into it through the Tray.
-
apt update && apt upgrade
-
Reading documentation on wp-cli: https://wp-cli.org/ Requirements: WP >= 3.7, PHP >= 5.3.29
-
apt install wordpress php php-cli mysql-server -y . no passwords for MySQL. (later @fsilva suggested I should have apache/nginx, mysql and php-fpm on distinct containers. As this environment is meant only to develop and test our blog, I'll leave that for later. In production, that may be a good idea).
-
apt install curl -y
-
Following docs: chmod +x wp-cli.phar && mv wp-cli.phar /usr/local/bin/wp
-
Downloaded tab completion from here and sourced it: https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
-
Install my text editor of choice: apt install nano -y
-
Edit /etc/apache2/sites-available/wordpress.conf:
Alias /blog /usr/share/wordpress <Directory /usr/share/wordpress> Options FollowSymLinks AllowOverride Limit Options FileInfo DirectoryIndex index.php Order allow,deny Allow from all </Directory> <Directory /usr/share/wordpress/wp-content> Options FollowSymLinks Order allow,deny Allow from all </Directory> -
service apache2 reload
-
sudo gzip -d /usr/share/doc/wordpress/examples/setup-mysql.gz
-
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wp_subutai subutai-blog.stage-hub.net
-
PHP didn't work. Of course, it's not enabled on apache. sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
-
http://subutai-blog.stage-hub.net/blog redirects to install script
-
Successful install!
Studying this: https://wpbeaches.com/set-git-workflow-local-devlopment-webserver/
See also: http://www.designcollective.io/blogs/manage-wordpress-with-git
- https://help.ubuntu.com/community/WordPress
- https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
- https://www.digitalocean.com/community/tutorials/como-instalar-o-wordpress-com-lamp-no-ubuntu-16-04-pt
- https://help.ubuntu.com/lts/serverguide/wordpress.html