world press ubuntu

  1. Install Nginx on Ubuntu Linux Use the Ubuntu APT command to install the Nginx server.
sudo apt-get update
sudo apt-get install nginx

nginx.Edit the conf configuration file.

Client in HTTP section_max_body_Add size.

Set the maximum upload size to 32 megabytes.

# vi /etc/nginx/nginx.conf

This is our configuration file.

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
client_max_body_size 32M;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

Manually restart the Nginx web server.

sudo service nginx restart
sudo service nginx status

Check the status of the Nginx service.

● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-12-29 04:29:22 UTC; 1h 17min ago
Docs: man:nginx(8)
Process: 2233 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status
Process: 2221 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exite
Main PID: 2238 (nginx)
Tasks: 2 (limit: 1152)
CGroup: /system.slice/nginx.service
├─2238 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─2239 nginx: worker process

The Nginx web server has been successfully installed.

2.Install MySQL on Ubuntu Linux
WordPress requires a database system to store all your settings.

Use the Ubuntu APT command to install the MySQL server.

sudo apt-get update
sudo apt-get install mysql-server mysql-client

To access the MySQL Services Console, use the following command:

sudo  mysql -u root -p

In the MySQL console, you need to perform the following tasks:

• Create a database named wordpress.
• Create a MySQL user account named wordpress.
• Take full control of your WordPress database to your WordPress users.

CREATE DATABASE wordpress CHARACTER SET UTF8 COLLATE UTF8_BIN;
CREATE USER 'wordpress'@'%' IDENTIFIED BY 'Yuuki@1024';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'%';
FLUSH PRIVILEGES;
quit;

3.Add PHP support to Nginx
Nginx requires an external program to add PHP support.

Install the required PHP packages using the Ubuntu APT command.

sudo apt-get update
sudo  apt-get install php7.2-fpm

Use the following command to install the required PHP module.

# apt-get install php7.2-xml php7.2-curl php7.2-gd php7.2-mbstring php7.2-readline
# apt-get install php7.2-bz2 php7.2-zip php7.2-json php7.2-opcache

Find the location of the PHP configuration file on your system.

php.Edit the ini configuration file.

# updatedb
# locate php.ini
# vi /etc/php/7.2/fpm/php.ini

Your PHP version may not be the same as ours.

The location of your PHP config file may not be the same as ours.

This is our configuration file.

file_uploads = On
max_execution_time = 300
memory_limit = 256M
post_max_size = 32M
max_input_time = 60
max_input_vars = 4440
upload_max_filesize = 32M

Edit the Nginx default website configuration file.

sudo vi /etc/nginx/sites-available/default

This is the original file before our setup.

server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
}

This is the new file with our settings.

server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}

Check the Nginx configuration file for any errors.

sudo  nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Restart the PHP service.
Restart the Nginx service.

sudo service php7.2-fpm restart
sudo service nginx restart

4.Install Wordpress on Ubuntu Linux
Once you've set up MySQL and Apache, it's time to start installing Wordpress.

Download the latest version of WordPress and unzip the package.

 cd /tmp
 wget https://wordpress.org/latest.tar.gz
 tar -zxvf latest.tar.gz

Move the WordPress folder inside the Apache root drive directory.

www-Give the data user full control over the WordPress directory and its files.

sudo mv wordpress /var/www/html/
sudo chown www-data.www-data /var/www/html/wordpress/* -R

WordPress config file wp-config.Create and edit php.

 cd /var/www/html/wordpress
 mv wp-config-sample.php wp-config.php
 vi wp-config.php

wp-config.Edit the MySQL database connection information in file.

As an example, this is the file with our settings.

define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'kamisama123');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

Set up Wordpress on Ubuntu Linux
Open your browser and go to the IP address of your web server/Enter the one with wordpress added.

In this example, the following URL is entered in the browser:

•http://200.200.200.200/wordpress

The WordPress installation wizard is displayed.

WordPress Select Language
On the next screen you will have to enter your website information.

wordpress website information
On the next screen, you will receive a confirmation of your WordPress installation.

wordpres finished installation
Click the Login button and enter your administrator account and password.

If you log in successfully, you will see the Wordpress dashboard.

Recommended Posts

world press ubuntu
Laravel8 ubuntu20
Ubuntu squid