Skip to content

Commit 7fd3fe8

Browse files
authored
update deploying steps
1 parent b42f29f commit 7fd3fe8

File tree

2 files changed

+70
-61
lines changed

2 files changed

+70
-61
lines changed

content/notes/deploying.md

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -105,50 +105,56 @@ Reference for site management commands: [ee site](https://easyengine.io/commands
105105

106106
## Migrating an Existing WordPress Website to EasyEngine
107107

108-
1. **Prepare your website data:**
109-
- Website source files: typically found in `/wp-content`.
110-
- Database: Export a `.sql` file using `wp db export`.
108+
{{% steps %}}
111109

112-
2. **Create a WordPress site without SSL (to avoid errors):**
110+
### Prepare your website data:
111+
- Website source files: typically found in `/wp-content`.
112+
- Database: Export a `.sql` file using `wp db export`.
113113

114-
```bash
115-
ee site create sample.com --type=wp --ssl=no --cache
114+
### Create a WordPress site without SSL (to avoid errors):
115+
116+
```bash
117+
ee site create sample.com --type=wp --ssl=no --cache
116118
```
117119

118-
3. **Copy the source files to EasyEngine's directory:**
120+
### Copy the source files to EasyEngine's directory:
119121

120-
```bash
121-
rsync -avhP /path/to/source/wp-content/ /opt/easyengine/sites/sample.com/app/htdocs/wp-content/
122-
```
122+
```bash
123+
rsync -avhP /path/to/source/wp-content/ /opt/easyengine/sites/sample.com/app/htdocs/wp-content/
124+
```
123125

124-
Check file permissions after copying.
126+
Check file permissions after copying.
125127

126-
4. **Restore the database:**
128+
### Restore the database:
127129

128-
```bash
129-
# Copy the database file
130-
rsync -avhP /path/to/source/database.sql /opt/easyengine/sites/sample.com/app/htdocs/
130+
```bash
131+
# Copy the database file
132+
rsync -avhP /path/to/source/database.sql /opt/easyengine/sites/sample.com/app/htdocs/
131133

132-
# Enter the container shell
133-
ee shell sample.com
134+
# Enter the container shell
135+
ee shell sample.com
134136

135-
# Import using WP-CLI
136-
wp db import database.sql
137+
# Import using WP-CLI
138+
wp db import database.sql
137139

138-
# Flush cache and exit
139-
wp cache flush && exit
140-
```
140+
# Flush cache and exit
141+
wp cache flush && exit
142+
```
141143

142-
5. **Check `wp-config.php`, verify permissions (must be `www-data:www-data`).**
143-
6. **Point the domain’s DNS to the EasyEngine server.**
144-
7. **Enable SSL:**
144+
### Check `wp-config.php`, verify permissions (must be `www-data:www-data`).
145145

146-
```bash
147-
ee site update sample.com --ssl=le
148-
```
146+
### Point the domain’s DNS to the EasyEngine server.
147+
148+
### Enable SSL:
149+
150+
```bash
151+
ee site update sample.com --ssl=le
152+
```
153+
154+
### Verify caching setup:
155+
- EasyEngine uses the `nginx-helper` plugin.
156+
- Ensure it's enabled and configured for Redis caching.
149157

150-
8. **Verify caching setup:**
151-
- EasyEngine uses the `nginx-helper` plugin.
152-
- Ensure it's enabled and configured for Redis caching.
158+
{{% /steps %}}
153159

154160
Reference: [EasyEngine Commands](https://easyengine.io/commands/)

content/notes/deploying.vi.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -102,59 +102,62 @@ Tham khảo danh sách các lệnh quản lý website: [ee site](https://easyeng
102102

103103
## Chuyển website WordPress có sẵn vào EasyEngine
104104

105-
1. **Chuẩn bị dữ liệu**
105+
{{% steps %}}
106+
107+
### Chuẩn bị dữ liệu
106108

107109
- **Source site**: thư mục mã nguồn website, thường là `/wp-content/`.
108110
- **Database**: file database (tốt nhất là sử dụng `wp db export` để xuất file này).
109111

110-
2. **Tạo website WordPress trên EasyEngine (không bật SSL để tránh lỗi)**
112+
### Tạo website WordPress trên EasyEngine (không bật SSL để tránh lỗi)
111113

112-
```bash
113-
ee site create sample.com --type=wp --ssl=no --cache
114-
```
114+
```bash
115+
ee site create sample.com --type=wp --ssl=no --cache
116+
```
115117

116-
3. **Sao chép source vào thư mục EasyEngine**
118+
### Sao chép source vào thư mục EasyEngine
117119

118-
```bash
119-
# Sao chép source
120-
rsync -avhP /path/to/source/wp-content/ /opt/easyengine/sites/sample.com/app/htdocs/wp-content/
121-
```
120+
```bash
121+
# Sao chép source
122+
rsync -avhP /path/to/source/wp-content/ /opt/easyengine/sites/sample.com/app/htdocs/wp-content/
123+
```
122124

123-
Sau khi sao chép, kiểm tra và đảm bảo quyền sở hữu là `www-data:www-data`.
125+
Sau khi sao chép, kiểm tra và đảm bảo quyền sở hữu là `www-data:www-data`.
124126

125-
4. **Nhập database vào website EasyEngine**
127+
### Nhập database vào website EasyEngine
126128

127-
```bash
128-
# Sao chép file database vào thư mục htdocs
129-
rsync -avhP /path/to/source/database.sql /opt/easyengine/sites/sample.com/app/htdocs/
129+
```bash
130+
# Sao chép file database vào thư mục htdocs
131+
rsync -avhP /path/to/source/database.sql /opt/easyengine/sites/sample.com/app/htdocs/
130132

131-
# Truy cập vào shell container
132-
ee shell sample.com
133+
# Truy cập vào shell container
134+
ee shell sample.com
133135

134-
# Import database sử dụng WP-CLI
135-
wp db import database.sql
136+
# Import database sử dụng WP-CLI
137+
wp db import database.sql
136138

137-
# Flush cache và thoát khỏi shell
138-
wp cache flush && exit
139-
```
139+
# Flush cache và thoát khỏi shell
140+
wp cache flush && exit
141+
```
140142

141-
5. **Cấu hình lại website**
143+
### Cấu hình lại website
142144

143145
- Kiểm tra lại file `wp-config.php`.
144146
- Kiểm tra quyền sở hữu trên thư mục `wp-content/` (phải là `www-data:www-data`).
145147
- Cập nhật DNS về server EasyEngine.
146148

147-
6. **Kích hoạt SSL**
149+
### Kích hoạt SSL**
150+
151+
```bash
152+
ee site update sample.com --ssl=le
153+
```
148154

149-
```bash
150-
ee site update sample.com --ssl=le
151-
```
155+
### Kiểm tra và kích hoạt cache
152156

153-
7. **Kiểm tra kích hoạt cache**
157+
EasyEngine sử dụng **nginx-helper plugin**, đảm bảo plugin này được bật đang sử dụng **Redis**.
154158

155-
EasyEngine sử dụng **nginx-helper plugin**, đảm bảo plugin này được bật và đang sử dụng **Redis**.
159+
{{% /steps %}}
156160

157-
---
158161

159162
Tham khảo thêm:
160163
[EasyEngine Commands](https://easyengine.io/commands/)

0 commit comments

Comments
 (0)