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
Downloading Wordpress
cd /tmp
curl -O https://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
touch /tmp/wordpress/.htaccess
cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
mkdir /tmp/wordpress/wp-content/upgrade
Change 2nd wordpress to name of directory to put wordpress in
sudo cp -a /tmp/wordpress/. /var/www/wordpress
setupwordpressubuntu22.1745883070.txt.gz · Last modified: 2025/04/28 23:31 by tektinkers