95.24 WordPress Basic Setup

20210219

WordPress uses MySQL to store its data, including users. First connect to the database engine.

sudo mysql -u root

Next create the required databases users. Replace <secret> with a strong password:

CREATE DATABASE wordpress;
CREATE USER 'wordpress'@'localhost' IDENTIFIED BY '<secret>';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost';
FLUSH PRIVILEGES;
QUIT

Then be sure to restart the database server:

wajig restart mysql

Configure the database information for WordPress to connect to it:

sudo editor /etc/wordpress/config-localhost.php