Ubuntu 22.04
Sponsored Link

Apache2 : Blog System : WordPress2022/05/12

Install the Blog System, WordPress.
[3] Install other required PHP modules.
apt -y install php-common php-gd php-mysql php-enchant hunspell

vi /etc/php/8.1/fpm/pool.d/www.conf
# add to the end
# maybe you need to configure parameters below for your usage
php_value[max_execution_time] = 600
php_value[memory_limit] = 2G
php_value[post_max_size] = 2G
php_value[upload_max_filesize] = 2G
php_value[max_input_time] = 600
php_value[max_input_vars] = 2000
php_value[date.timezone] = Asia/Tokyo

systemctl restart php8.1-fpm

[4] Create User and Database on MariaDB for WordPress.

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 37
Server version: 10.6.7-MariaDB-2ubuntu1 Ubuntu 22.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database wordpress; 
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on wordpress.* to wordpress@'localhost' identified by 'password'; 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges; 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit 
[5] Configure Apache2 for WordPress.
wget https://wordpress.org/latest.tar.gz

tar zxvf latest.tar.gz -C /var/www/

chown -R www-data. /var/www/wordpress

vi /etc/apache2/conf-available/wordpress.conf
# create new

Timeout 600
ProxyTimeout 600

Alias /wordpress "/var/www/wordpress/"
<Directory "/var/www/wordpress">
    Options FollowSymLinks
    AllowOverride All
    Require all granted

    <FilesMatch \.(php|phar)$>
        SetHandler "proxy:unix:/var/run/php/php8.1-fpm.sock|fcgi://localhost/"

a2enconf wordpress

Enabling conf wordpress.
To activate the new configuration, you need to run:
  systemctl reload apache2

systemctl reload apache2

[6] Access to the URL [https://(Server's Hostname or IP address)/wordpress/] with Web browser on any Client, then following screen is displayed. Click [Let's go!] button.
[7] Configure Database connection infomation. Specify MariaDB user and database you added on [4].
[8] Click the [Run the installation] button.
[9] Set Blog site title and Administrative user account for WordPress.
[10] That's OK if [Success!] is displayed like follows. Click the [Log in] button.
[11] Login with the administrative user you added in [9].
[12] This is the WordPress management site. You can add daily posts and other many tasks on here.
[13] For Blog's top page, it's [(your server's hostname or IP address)/wordpress/]. Try to add a post to verify working normally.
Matched Content