Skip to content

Commit 4ad98d2

Browse files
authored
Merge pull request #13 from devsapp/fix-wp
update wordpress template
2 parents a649812 + bb91d00 commit 4ad98d2

File tree

1,627 files changed

+434765
-47674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,627 files changed

+434765
-47674
lines changed

update.list

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
web-framework/php/laravel
2-
web-framework/php/thinkphp
3-
web-framework/php/wordpress
4-
web-framework/php/zblog
1+
web-framework/php/wordpress

web-framework/php/wordpress/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Type: Application
22
Name: start-wordpress
33
Provider:
44
- 阿里云
5-
Version: 1.1.15
5+
Version: 1.1.16
66
Description: 快速部署一个 wordpress 框架到阿里云函数计算
77
HomePage: https://github.com/devsapp/start-web-framework
88
Tags:

web-framework/php/wordpress/src/code/bootstrap

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ set +e
33

44
mkdir -p /tmp/log/nginx/
55
mkdir -p /tmp/var/nginx/
6-
mkdir -p /tmp/var/sessions/
76

8-
mkdir -p /mnt/auto/wordpress/sessions
9-
chown -R www-data:www-data mnt/auto/wordpress/sessions
7+
mkdir -p /mnt/auto/wordpress/cookies
8+
chown -R www-data:www-data /mnt/auto/wordpress/cookies
109

11-
mkdir -p /mnt/auto/wordpress/log
12-
chown -R www-data:www-data /mnt/auto/wordpress/log
10+
mkdir -p /mnt/auto/wordpress/sessions
11+
chown -R www-data:www-data /mnt/auto/wordpress/sessions
1312

13+
mkdir -p /mnt/auto/wordpress/wp-content/database
14+
chown -R www-data:www-data /mnt/auto/wordpress/wp-content/database
1415

1516
echo "start php-fpm"
16-
php-fpm7.4 -c /code/php.ini-production -y /code/php-fpm.conf
17+
php-fpm7.4 -c /code/php.ini -y /code/php-fpm.conf
1718

1819
echo "start nginx"
1920
nginx -c /code/nginx.conf

web-framework/php/wordpress/src/code/nginx.conf

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ http {
4545
charset utf-8;
4646

4747
location / {
48-
try_files $uri $uri/ /index.php?$query_string;
48+
index index.php index.html;
49+
try_files $uri $uri/ /index.php?$args;
4950
}
5051

5152
location = /favicon.ico { access_log off; log_not_found off; }
@@ -56,11 +57,18 @@ http {
5657
location ~ \.php$ {
5758
fastcgi_pass 127.0.0.1:9527;
5859
fastcgi_index index.php;
59-
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
6060
include /etc/nginx/fastcgi_params;
61+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
6162
proxy_read_timeout 180;
6263
}
6364

65+
location ~.*\.(js|css|html|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|webm|htc|xml|woff)$
66+
{
67+
expires 1d;
68+
access_log off;
69+
try_files $uri =404;
70+
}
71+
6472
location ~ /\.(?!well-known).* {
6573
deny all;
6674
}
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
[global]
2-
pid = /tmp/php7.2-fpm.pid
3-
error_log = /tmp/php7.2-fpm.log
2+
pid = /tmp/php7.4-fpm.pid
3+
error_log = /tmp/php7.4-fpm.log
44

55
[www]
66
user = www-data
77
group = www-data
88
listen = 127.0.0.1:9527
99
listen.owner = www-data
1010
listen.group = www-data
11-
pm = dynamic
12-
pm.max_children = 5
13-
pm.start_servers = 2
14-
pm.min_spare_servers = 1
15-
pm.max_spare_servers = 3
11+
pm = static
12+
pm.max_children = 4

web-framework/php/wordpress/src/code/php.ini-production renamed to web-framework/php/wordpress/src/code/php.ini

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,14 @@ bcmath.scale = 0
9999

100100
[Session]
101101
session.save_handler = files
102+
session.save_path=/mnt/auto/wordpress/sessions
102103
session.use_strict_mode = 0
103104
session.use_cookies = 1
104105
session.use_only_cookies = 1
105106
session.name = PHPSESSID
106107
session.auto_start = 0
107108
session.cookie_lifetime = 0
108-
session.cookie_path = /
109+
session.cookie_path = /mnt/auto/wordpress/cookies
109110
session.cookie_domain =
110111
session.cookie_httponly =
111112
session.serialize_handler = php
@@ -170,6 +171,14 @@ extension=xml.so
170171
extension=iconv.so
171172
extension=xsl.so
172173
extension=wddx.so
173-
zend_extension=opcache.so
174+
extension=pdo_sqlite.so
175+
extension=sqlite3.so
174176

175-
session.save_path=/mnt/auto/wordpress/sessions
177+
[opcache]
178+
zend_extension=opcache.so
179+
opcache.enable=1
180+
opcache.memory_consumption=256
181+
opcache.interned_strings_buffer=64
182+
opcache.max_accelerated_files=32531
183+
opcache.save_comments=1
184+
opcache.fast_shutdown=0

web-framework/php/wordpress/src/code/wordpress/license.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
WordPress - Web publishing software
22

3-
Copyright 2011-2021 by the contributors
3+
Copyright 2011-2022 by the contributors
44

55
This program is free software; you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by

web-framework/php/wordpress/src/code/wordpress/readme.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ <h2>Migrating from other systems</h2>
5151

5252
<h2>System Requirements</h2>
5353
<ul>
54-
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.6.20</strong> or higher.</li>
55-
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li>
54+
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.6.20</strong> or greater.</li>
55+
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or greater.</li>
5656
</ul>
5757

5858
<h3>Recommendations</h3>
5959
<ul>
60-
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.4</strong> or higher.</li>
61-
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.6</strong> or higher.</li>
60+
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.4</strong> or greater.</li>
61+
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.7</strong> or greater OR <a href="https://mariadb.org/">MariaDB</a> version <strong>10.2</strong> or greater.</li>
6262
<li>The <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
6363
<li><a href="https://wordpress.org/news/2016/12/moving-toward-ssl/">HTTPS</a> support.</li>
6464
<li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>

0 commit comments

Comments
 (0)