5.安装wordpress
wget https://wordpress.org/latest.tar.gz; //解压 tar -xzf latest.tar.gz -C /var/www/html;
解压完成之后,找到:/wordpress/wp-config-sample.php文件,修改数据库名称、用户名、密码,字段如下:
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', '你的数据库名称'); /** MySQL database username */ define('DB_USER', '你的用户名'); /** MySQL database password */ define('DB_PASSWORD', '你的密码'); /** MySQL hostname */ define('DB_HOST', '你的host');
修改完成之后,把wp-config-sample.php的文件名改为:wp-config.php。
6.配置nginx
以下是我的配置,可以参考:
# * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/ upstream php { #server unix:/tmp/php-cgi.socket; #指向到fpm的默认9000端口, server 127.0.0.1:9000; } server { listen 80 ; listen [::]:80 ; server_name www.domain.com; root /web/www.domain.com/; index index.php; location ~ \.php$ { #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini include fastcgi.conf; fastcgi_intercept_errors on; fastcgi_pass php; } # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; }
7.安全设置
世界上大概有20%左右的网站用的是wordpress系统,这也导致wordpress成为了黑客的攻击对象,安全问题不容忽视,无论对于个人还是企业。对于普通使用者有没有简单的方法让我们快速提升安全防护呢?我查看了几款安全插件,有这么一款插件可以帮助我们提升安全攻略,插件名是All In One WP Security & Firewall 。这款插件相对普通用户来说显得简单易用。
标签:WordPress
相关阅读 >>
bluehost服务器主机购买及安装wordpress的教程
wordpress提示require_once() failed opening required的解决方法
文档格式转换大全:怎么把word文档转成pdf,wps文档转换成word
更多相关阅读请进入《wordpress》频道 >>