您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 汕头分类信息网,免费分类信息发布

Ubuntu LNMP怎么部署WordPress

2024/2/23 22:40:22发布12次查看
下面由wordpress教程栏目给大家介绍ubuntu lnmp怎么部署 wordpress,希望对需要的朋友有所帮助!
ubuntu lnmp 部署 wordpress软件版本说明:
ubuntu: 16.04 lts;
wordpress: 4.7 zh-cn
适用人群:初级 php 入门者和广大想拥有自己站点的设计师!
安装 php7.11.首先添加 ppa
sudo apt-get updatesudo lc_all=en_us.utf-8 add-apt-repository ppa:ondrej/php -ysudo apt-get update
2.然后,安装 php7.1
sudo apt-get -y install php7.1sudo apt-get -y install php7.1-mysql php7.1-fpm
安装 mysqlsudo apt-get -y install mysql-server-5.7
设置密码就,ok。
至此,基本的 wordpress 环境就准备完毕了。
部署 wordpress首先通过 git 拉取 wordpress 源代码:
git clone https://github.com/jellybool/wordpress.git /var/www/wordpress
配置 mysql通过下面的命令来登录 mysql:
mysql -u root -p
在 mysql 执行:
create database wordpress default character set utf8 collate utf8_unicode_ci;create user 'jellybool' identified by 'laravist';grant all privileges on wordpress.* to 'jellybool';quit
注意上面的 jellybool和laravist是根据你自己的需求来设置的。
配置 nginx打开配置文件:
vim /etc/nginx/sites-available/default
进行以下配置配置:
root /var/www/wordpress;index index.php index.html index.htm index.nginx-debian.html;# 注意我们添加了 index.phplocation / {        try_files $uri $uri/ /index.php?$query_string;    }location ~ \.php$ {        try_files $uri /index.php =404;        fastcgi_split_path_info ^(.+\.php)(/.+)$;        fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;        fastcgi_index index.php;        fastcgi_param script_filename $document_root$fastcgi_script_name;        include fastcgi_params; }
访问你的域名,就可以进行非常出名的 wordpress 五分钟安装过程啦!安装完毕之后,你就拥有一个 wordpress 的站点啦!
最后配置 wordpress 文件上传,打开 wp-config.php 文件:
define('fs_method', 'direct');define('fs_chmod_dir', 0777);define('fs_chmod_file', 0777);
安装其他的 php 扩展sudo apt install -y php7.1-gd php7.1-mbstring php7.1-xmlrpc
至此,打完收工。
以上就是ubuntu lnmp怎么部署wordpress的详细内容。
汕头分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录