Assuming Ubuntu 17.10:
# install packages
sudo apt upgrade
sudo apt update
# mysql-server will ask for root password, set it
sudo apt install mysql-server
sudo apt install apache2
sudo apt install autoremove
# mysql config
sudo systemctl restart mysql.service
# check if mysql-server is running
sudo netstat -tap | grep mysql
# apache config
sudo systemctl restart apache2.service
Create your first wordpress application. Create and edit file: /etc/apache2/sites-available/wordpress.conf
. Example:
Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
<Directory /usr/share/wordpress/wp-content>
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
Then:
- Enable site:
sudo a2ensite blog
- Restart apache:
sudo systemctl reload apache2