How to Install WordPress with Mariadb(or MySQL) on Ubuntu-20.04
##############################################################
Environment
Device : Odroid-HC2
OS : Ubuntu-20.04
IP : 192.168.101.100
Pre Insall App : Mariadb(or MySQL), NGINX, PHP
##############################################################
1. Install WordPress
2. Generate database for WordPress
WordPress
SQL database : wordpress
SQL userid : wordpress
SQL password : test@test
##############################################################
$ sudo mysql -u root
> create database wordpress;
> grant all on wordpress.* to wordpress@localhost identified by 'test@test';
> flush privileges;
> quit;
3. Setup WordPress
$ sudo ln -s /usr/share/wordpress /var/www/html/wp
$ sudo ls /var/www/html/ -l
$ sudo chown -R www-data:www-data /var/www/html/wp
$ sudo chown -R www-data:www-data /var/www/html/wp/
$ sudo ls /var/www/html/ -l
$ sudo ls /var/www/html/wp/ -l
$ sudo cp /var/www/html/wp/wp-config-sample.php /var/www/html/wp/wp-config.php
$ sudo nano /var/www/html/wp/wp-config.php
Change Configuration
=>
define( 'DB_NAME', 'wordpress' );
define( 'DB_USER', 'username_here' );
=>
define( 'DB_USER', 'wordpress' );
define( 'DB_PASSWORD', 'password_here' );
=>
define( 'DB_PASSWORD', 'test@test' );
Insert Configuration
define('FS_METHOD', 'direct');
$ sudo systemctl restart nginx
4. Connect Web
test@test.com