Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy WordPress in Ubuntu LNMP

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how to deploy WordPress in Ubuntu LNMP, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Ubuntu LNMP deployment WordPress

Software release Notes:

Ubuntu: 16.04 LTS

WordPress: 4.7 zh-CN

Applicable to the crowd: entry-level PHP beginners and designers who want to have their own site!

Install PHP7.1

1. Add PPA first

Sudo apt-get updatesudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php-ysudo apt-get update

two。 Then, install PHP7.1

Sudo apt-get-y install php7.1sudo apt-get-y install php7.1-mysql php7.1-fpm install Mysqlsudo apt-get-y install mysql-server-5.7

Set the password, OK.

At this point, the basic WordPress environment is ready.

Deploy WordPress

First pull the WordPress source code through git:

Git clone https://github.com/JellyBool/wordpress.git / var/www/wordpress configuration Mysql

Log in to mysql with the following command:

Mysql-u root-p

Execute on 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

Note that the jellybool and laravist above are set up according to your own needs.

Configure Nginx

Open the configuration file:

Vim / etc/nginx/sites-available/default

Make the following configuration configuration:

Root / var/www/wordpress;index index.php index.html index.htm index.nginx-debian.html;# notice that we added 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;}

Visit your domain name and you can go through the famous five-minute installation process of WordPress! After installation, you will have a WordPress site!

Last

Configure WordPress file upload and open wp-config.php file:

Define ('FS_METHOD',' direct'); define ('FS_CHMOD_DIR', 0777); define (' FS_CHMOD_FILE', 0777); install other php extensions sudo apt install-y php7.1-gd php7.1-mbstring php7.1-xmlrpc to share here on how to deploy WordPress in Ubuntu LNMP. I hope the above can be helpful and learn more. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report