Sfoglia il codice sorgente

Update 'wordpress-with-docker-scripts.md'

master
Dashamir Hoxha 4 anni fa
parent
commit
a2db518e50
1 ha cambiato i file con 149 aggiunte e 1 eliminazioni
  1. +149
    -1
      wordpress-with-docker-scripts.md

+ 149
- 1
wordpress-with-docker-scripts.md Vedi File

@@ -65,7 +65,7 @@ Reference: https://gitlab.com/docker-scripts/mariadb#installation
##### 2. Install Wordpress sites

<details>
<summary>Install Wordpress container</summary>
<summary>1. Install a wordpress container</summary>

```
ds pull wordpress
@@ -78,3 +78,151 @@ ds make
Reference: https://gitlab.com/docker-scripts/wordpress#installation

</details>

<details>
<summary>2. Install a site</summary>

```
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

</details>

<details>
<summary>3. Install another site</summary>

```
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

</details>

<details>
<summary>4. Install a second container</summary>

```
ds init wordpress @wordpress2
cd /var/ds/wordpress2/
vim settings.sh
ds make
```

</details>

<details>
<summary>5. Install a site on the second container</summary>

```
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

</details>

<details>
<summary>6. Clone and delete a site</summary>

```
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
```

</details>

<details>
<summary>7. Backup and restore a site</summary>

```
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

</details>

<details>
<summary>3. Using wp-cli</summary>

```
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
```

</details>

<details>
<summary>3. Working inside the container</summary>

```
ds shell
ls
cd site3.wp.fs.al
wp
wp option get siteurl
wp option get home
```

</details>

Caricamento…
Annulla
Salva