User Tools

Site Tools


setupwordpressubuntu22

This is an old revision of the document!


Setup Wordpress - Ubuntu 22


Setup Database's Username and Password

sudo mysql
mysql -u root -p
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Change wordpressuser and password to whatever you want:

CREATE USER 'wordpressuser'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
EXIT;


Installing Additional PHP Extensions:

sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
sudo systemctl restart apache2


Adjust Apache Config to allow overrides and rewrites in .htaccess

sudo nano /etc/apache2/sites-available/wordpress.conf
<VirtualHost *:80>
. . .
    <Directory /var/www/wordpress/>
        AllowOverride All
    </Directory>
. . .
</VirtualHost>
sudo a2enmod rewrite
sudo apache2ctl configtest
sudo systemctl restart apache2




Credit to: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-22-04-with-a-lamp-stack

setupwordpressubuntu22.1745882920.txt.gz · Last modified: 2025/04/28 23:28 by tektinkers