WordPress Installation | white screen error fixed | 413 - Request Entity Too Large Fixed - Tutorial

WordPress Installation | white screen error fixed | 413 - Request Entity Too Large Fixed - Tutorial

Lina

1 год назад

343 Просмотров

00:00 - Intro
00:43 - Installation
06:00 - Fixing the errors
____________________ Commands____________________
sudo apt update
sudo apt upgrade
sudo apt install nginx mariadb-server
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4-fpm php7.4-mysql
php -v
cd /var/www
sudo wget htt ps://wordpress.org/latest.tar.gz
sudo tar -xzvf latest.tar.gz
sudo rm latest.tar.gz
sudo chown -R www-data:www-data wordpress
sudo find wordpress/ -type d -exec chmod 755 {} \;
sudo find wordpress/ -type f -exec chmod 644 {} \;
sudo mysql_secure_installation
sudo mysql -u root -p
create database example_db default character set utf8 collate utf8_unicode_ci;
create user 'example_user'@'localhost' identified by 'example_pw';
grant all privileges on example_db.* TO 'example_user'@'localhost';
flush privileges;
exit
cd /etc/nginx/sites-available/
sudo vim wordpress.conf

upstream php-handler {
server unix:/var/run/php/php7.4-fpm.sock;
}
server {
listen 80;
server_name *************;
root /var/www/wordpress;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass php-handler;
}
}
sudo ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

add client_max_body_size 100M; to nginx config

change php config php.ini file found in etc/php/7.4/fpm
post_max_size = 120M 
upload_max_filesize = 120M 
memory_limit = 500M 
max_execution_time = 300 
max_input_time = 300

sudo systemctl stop php7.4-fpm
sudo systemctl start php7.4-fpm
sudo systemctl stop nginx
sudo systemctl start nginx
Ссылки и html тэги не поддерживаются


Комментарии: