From a2db518e50561445d61664af88229a9efebf8c8d Mon Sep 17 00:00:00 2001 From: Dashamir Hoxha Date: Wed, 29 Jul 2020 16:14:09 +0000 Subject: [PATCH] Update 'wordpress-with-docker-scripts.md' --- wordpress-with-docker-scripts.md | 150 ++++++++++++++++++++++++++++++- 1 file changed, 149 insertions(+), 1 deletion(-) diff --git a/wordpress-with-docker-scripts.md b/wordpress-with-docker-scripts.md index cb0878a..819345e 100644 --- a/wordpress-with-docker-scripts.md +++ b/wordpress-with-docker-scripts.md @@ -65,7 +65,7 @@ Reference: https://gitlab.com/docker-scripts/mariadb#installation ##### 2. Install Wordpress sites
-Install Wordpress container +1. Install a wordpress container ``` ds pull wordpress @@ -78,3 +78,151 @@ ds make Reference: https://gitlab.com/docker-scripts/wordpress#installation
+ +
+2. Install a site + +``` +cd /var/ds/wordpress1/ +ds site +ds site init site1.wp.fs.al +ls +ls site1.wp.fs.al +ls apache2/sites-enabled/ +cat apache2/sites-enabled/site1.wp.fs.al.conf +ls ../wsproxy/sites-enabled/ +cat ../wsproxy/sites-enabled/site1.wp.fs.al.conf +``` + +``` +vim site1.wp.fs.al/settings.sh +ds site install site1.wp.fs.al +ls site1.wp.fs.al/ +``` + +Try in browser https://site1.wp.fs.al and login as admin. + +Reference: https://gitlab.com/docker-scripts/wordpress#manage-a-website + +
+ +
+3. Install another site + +``` +cd /var/ds/wordpress1/ +ds site init site2.wp.fs.al +ls +ls site2.wp.fs.al +ls apache2/sites-enabled/ +ls ../wsproxy/sites-enabled/ + +vim site2.wp.fs.al/settings.sh +ds site install site2.wp.fs.al +ls site2.wp.fs.al/ +``` + +Try in browser https://site2.wp.fs.al + +
+ +
+4. Install a second container + +``` +ds init wordpress @wordpress2 +cd /var/ds/wordpress2/ +vim settings.sh +ds make +``` + +
+ +
+5. Install a site on the second container + +``` +cd /var/ds/wordpress2/ +ds site init site3.wp.fs.al +vim site3.wp.fs.al/settings.sh +ds site install site3.wp.fs.al +ls site3.wp.fs.al/ +``` + +Try in browser https://site3.wp.fs.al + +
+ +
+6. Clone and delete a site + +``` +cd /var/ds/wordpress2/ +ds site clone +ds site clone site3.wp.fs.al site4.wp.fs.al +``` + +Try in browser https://site4.wp.fs.al + +``` +ds site del +ds site del site4.wp.fs.al +``` + +
+ +
+7. Backup and restore a site + +``` +cd /var/ds/wordpress2/ +ds backup +ds backup site3.wp.fs.al +ls -lh backup/ +``` + +``` +ds site del site3.wp.fs.al +``` + +Try in browser https://site3.wp.fs.al + +``` +ds site init site3.wp.fs.al +ls site3.wp.fs.al/ +ds restore +ds restore site3.wp.fs.al backup/wordpress-site3.wp.fs.al-2020-07-29.tgz +``` + +Try in browser https://site3.wp.fs.al + +
+ +
+3. Using wp-cli + +``` +cd /var/ds/wordpress2/ +ds wp +ds wp site3.wp.fs.al +ds wp site3.wp.fs.al option +ds wp site3.wp.fs.al option list +ds wp site3.wp.fs.al option get siteurl +ds wp site3.wp.fs.al option get home +``` + +
+ +
+3. Working inside the container + +``` +ds shell +ls +cd site3.wp.fs.al +wp +wp option get siteurl +wp option get home +``` + +