centos install wordpress

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_42818402/article/details/100572917

1. Installation and Configuration mysql

https://mp.csdn.net/postedit/100572899

2. Installation and Configuration nginx

centos install nginx

//nginx配置
server {
    listen       80;                        # 监听端口
    server_name www.siteA.com siteA.com;    # 站点域名
    root  /data/webs/wordpress;              # 站点根目录
    index index.html index.htm index.php;   # 默认导航页

    location / {
        # WordPress固定链接URL重写
        if (!-e $request_filename) {
            rewrite (.*) /index.php;
        }
    }
    # PHP配置
    location ~ \.php$ {
        root  /data/webs/wordpress;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;        
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

3. Installation and Configuration php

https://mp.csdn.net/postedit/100572876

In php.ini /etc/php.ini
Step. 1: php.ini added extension = mysql.so
Step 2: Modify extension_dir = "/ usr / lib64 / php / modules" in the PHP.ini

4. Installation and Configuration wordpress

4.1 Chinese version Download

https://cn.wordpress.org/download/releases/

4.2 Configuration

Open the configuration file wp-config-sample.php, modifying these three
the DEFINE ( 'DB_NAME', 'dbname');
the DEFINE ( 'DB_USER', 'root');
the DEFINE ( 'DB_PASSWORD', 'your mysql password') ;
adding
DEFINE ( 'FS_METHOD', 'Direct');
DEFINE ( 'FS_CHMOD_DIR', 0777);
DEFINE ( 'FS_CHMOD_FILE', 0777);

4.3 modify permissions

Modify the web root directory permissions, if the root directory is WordPress
chmod 777 WordPress

4.4 Starting nginx, php-fpm, mysql, and then open the home page, follow the prompts

Guess you like

Origin blog.csdn.net/weixin_42818402/article/details/100572917