1. Open the URL: http://www.aaaacn.net/wp-admin/install.php, and an error occurs: HTTP ERROR 500, as shown in Figure 1

2. Open the URL: http://www.aaaacn.net/phpinfo.php, and it runs normally, as shown in Figure 2

3. View the Virtualhost conf: /usr/local/nginx/conf/vhost/www.aaaacn.net.conf
server {
listen 80;
server_name www.aaaacn.net aaaacn.net;
access_log /data/wwwlogs/www.aaaacn.net_nginx.log combined;
index index.html index.htm index.php;
root /data/wwwroot/www.aaaacn.net;
if ($host != www.aaaacn.net) { return 301 $scheme://www.aaaacn.net$request_uri; }
include /usr/local/nginx/conf/rewrite/wordpress.conf;
#error_page 404 /404.html;
#error_page 502 /502.html;
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
}
4. View the Rewrite rule: /usr/local/nginx/conf/rewrite/wordpress.conf
location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* ^/wp-content/uploads/.*\.php$ {
deny all;
}
5. Check the directory permissions. I found that for some files in the WordPress directory, the permission user and group were no longer www, but root. This was probably because the files in the WordPress directory were copied by the root user, as shown in Figure 3

6. When file permission issues occur, execute the following 3 commands in sequence to set the permission user and group to www, resetting the entire /data/wwwroot/ directory, as shown in Figure 4

chown -R www.www /data/wwwroot/
find /data/wwwroot/ -type d -exec chmod 755 {} \;
find /data/wwwroot/ -type f -exec chmod 644 {} \;
7. Edit /data/wwwroot/www.aaaacn.net/wp-config.php to set the authentication keys and salts, as shown in Figure 5

8. Enable “debug” mode across the entire WordPress installation by editing /data/wwwroot/www.aaaacn.net/wp-config.php
define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
9. Set whether error messages are displayed on the screen as part of the output, and set it to yes. Edit /data/wwwroot/www.aaaacn.net/wp-admin/install.php. These two options are turned off in phpinfo, as shown in Figure 6

error_reporting(-1);
ini_set('display_errors', '1');
ini_set('log_errors', '1');
10. Open the URL: http://www.aaaacn.net/wp-admin/install.php, and the detailed information for the HTTP ERROR 500 error appears, as shown in Figure 7

Warning: require(/data/wwwroot/www.aaaacn.net/wp-includes/load.php): failed to open stream: No such file or directory in /data/wwwroot/www.aaaacn.net/wp-settings.php on line 19
Warning: require(/data/wwwroot/www.aaaacn.net/wp-includes/load.php): failed to open stream: No such file or directory in /data/wwwroot/www.aaaacn.net/wp-settings.php on line 19
Fatal error: require(): Failed opening required '/data/wwwroot/www.aaaacn.net/wp-includes/load.php' (include_path='.:/usr/local/php/lib/php') in /data/wwwroot/www.aaaacn.net/wp-settings.php on line 19
11. Analysis: /data/wwwroot/www.aaaacn.net/wp-includes/load.php, the file does not exist, as shown in Figure 8

12. I decided to delete all files in /data/wwwroot/www.aaaacn.net, download the installation package again, extract it, and copy the files to /data/wwwroot/www.aaaacn.net. I verified that load.php already exists, and set the permission user and group to www, as shown in Figure 9

wget https://cn.wordpress.org/latest-zh_CN.tar.gz
tar -xzvf latest-zh_CN.tar.gz
cp -rf /root/wordpress/* /data/wwwroot/www.aaaacn.net
chown -R www.www /data/wwwroot/
find /data/wwwroot/ -type d -exec chmod 755 {} \;
find /data/wwwroot/ -type f -exec chmod 644 {} \;
13. Open the URL: http://www.aaaacn.net/wp-admin/install.php, and it works normally as expected. I am not sure why load.php was missing after extraction earlier? As shown in Figure 10

