Wordpress不识别Ubuntu18.04液滴上的PHP更新,PHP 7.4.3来自repos。
它说我有PHP版本7。
如何使WP接受更新?
我的.htaccess里有这个
# END WordPress
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 400M
php_value max_execution_time 180
php_value max_input_time 180
# Wordfence WAF
<IfModule mod_php7.c>
php_value auto_prepend_file '/var/www/html/wordfence-waf.php'
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Files>
# END Wordfence WAFWP_DEBUG true不产生错误
root@benja2:~# a2enmod php7.4
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.4:
Enabling module php7.4.
To activate the new configuration, you need to run:
systemctl restart apache2
root@benja2:~# systemctl restart apache2
root@benja2:~#我把这个放在自己的wordfence- have . this中
<?php
// Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this.
if (file_exists('/var/www/html/wp-content/plugins/wordfence /waf/bootstrap.php')) {
define("WFWAF_LOG_PATH", '/var/www/html/wp-content/wflogs/');
include_once '/var/www/html/wp-content/plugins/wordfence /waf/bootstrap.php';
}
?>谢谢
发布于 2020-03-16 19:00:09
禁用php5模块。
然后键入
sudo a2dismod php5.6 (old php version)
sudo a2enmod php7.4 (new php version)现在再试一次。
https://askubuntu.com/questions/1217640
复制相似问题