ワン:ダウンロードして解凍WordPressのインストールパッケージ
ダウンロード:https://wordpress.org/latest.tar.gz
- アーカイブをダウンロードするには、リモートサーバーにワードプレスをアップロードするFTPを使用する場合は、アップロードします
- あなたは(Linuxシステム)をダウンロードするには、リモートサーバー上で直接wgetのツールを使用して、リモートサーバへのシェルアクセスを使用している場合
wget https://wordpress.org/latest.tar.gz
- 解凍:
tar -xzvf latest.tar.gz
2:Wordpressのデータベースとユーザーを作成します。
[root@vps]# mysql -uroot -p
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.3.21-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> drop database wordpress;
Query OK, 12 rows affected (0.300 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.000 sec)
MariaDB [(none)]> create database wordpress;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> grant all privileges on wordpress.* to "username"@'hostname' identified by 'password';
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> exit
Bye
3:設定のwp-config.phpファイル
Wordpressのは、自分の設定してインストールスクリプトを実行するときに行うことができますwp-config.php
ファイルを、手動で設定することができますwp-config.php
ファイルを
-
ウィル
wp-config-sample.php
名前を変更wp-config.php
-
編集
wp-config.php
ファイル// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define( 'DB_NAME', 'database_name_here' ); # 为创建worpress的数据库名称 /** MySQL database username */ define( 'DB_USER', 'username_here' ); # 为创建的wrdpress用户名 /** MySQL database password */ define( 'DB_PASSWORD', 'password_here' ); # 为创建的wordpress用户名的密码 /** MySQL hostname */ define( 'DB_HOST', 'localhost' ); # 为设置的hostname /** Database Charset to use in creating database tables. */ define( 'DB_CHARSET', 'utf8' ); /** The Database Collate type. Don't change this if in doubt. */ define( 'DB_COLLATE', '' );
4:サイト上のファイルの場所を設定します。
-
nginxのは、デフォルトのファイルの場所は、使用されます。
/usr/share/nginx/html
-
また、あなたはnginxのウェブプロフィールを変更する必要があり、ファイルの場所をカスタマイズすることができ、ここに私のワードプレスのウェブサイトプロファイルです
[root@vps]# cat /etc/nginx/conf.d/alongway.top.conf server { listen 80; server_name alongway.top www.alongway.top; location / { root /data/www/wordpress; index index.php index.html index.htm; } error_page 500 502 503 504 403 404 /404.html; location = /404.html { root /data/www/blog; } location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
5:インストールスクリプトを実行します
Webブラウザでとインストールスクリプトを実行します
私たちは、Webサイトのルートディレクトリを設定していると、WebのルートディレクトリにWordpressのファイルを置いている、訪問:
http://www.alongway.top/wp-admin/install.php
この時点で、インストールは完了です
トラブルシューティングのインストールテーマプラグインのアップデートはFTPが必要です
ワードプレスのウェブサイトのディレクトリにwp-config.php
ファイルを追加し、次の
vim wp-config.php
define('FS_METHOD','direct');
define('FS_CHMOD_DIR',0777);
define('FS)CHMOD_FILE',0777);