== Install database == apt-get install mariadb-server == Secure database == mysql_secure_installation Enter current password for root (enter for none): Set root password? [Y/n] n Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] y Remove test database and access to it? [Y/n] y Reload privilege table now? [Y/n] y == Create Wordpress database == mysql CREATE DATABASE wordpress; CREATE USER 'wordpress'@'localhost' IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON wordpress.* to 'wordpress'@'localhost'; FLUSH PRIVILEGES; quit == Install Apache/PHP == apt-get install php == Install PHP MySQL driver == apt-get install php-mysql == Adjust Apache/PHP configuration == # adjust /etc/apche2/sites-available/000-default.conf # DocumentRoot /srv/wordpress # adjust /etc/apache2.conf # umcomment section in /etc/apache2.conf # change /srv/ to /srv/wordpress/ # change AllowOverride None to AllowOverride All # adjust /etc/apache2/conf-available/security.conf # ServerTokens Prod # ServerSignature Off # uncomment security headers # Header set X-Content-Type-Option: "nosniff" # Header set X-Frame-Options: "sameorigin" # enable mod_headers a2enmod headers # enable mod_rewrite a2enmod rewrite # wordpress needs following additional php modules apt-get install php-curl php-dom php-mbstring php-imagick php-zip php-gd # restart apache service apache2 restart == Install Wordpress == cd /srv wget https://wordpress.org/latest.tar.gz tar xfvz latest.tar.gz chown -R www-data:www-data /srv/wordpress # open URL in browser # http:/// # follow the installation instructions == Upgrade to PHP 7.4 == apt-get install ca-certificates apt-transport-https wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list apt-get update apt-get install php7.4 apt-get install php7.4-cli php7.4-common php7.4-curl php7.4-mbstring php7.4-mysql php7.4-xml php7.4-dom php7.4-mbstring php7.4-imagick php7.4-zip php7.4-gd a2dismod php7.0 a2enmod php7.4 service apache2 restart # Adjust upload size in /etc/php/7.4/apache2/php.ini # upload_max_filesize = 8M service apache2 restart