Appearance
Wordpress on Linux
Guide to Installing WordPress on Linux
Instructions
1. Download the files
bash
git clone https://github.com/ArduinoDenis/wordpress_linux.git2. Run the installation script
bash
cd wordpress_linux/ && sudo chmod 700 installer.sh && ./installer.sh3. Wait for the completion of the installation of various programs.
4. Post-installation manual procedure
- Securely install MySQL
bash
sudo mysql_secure_installation- Press enter and input the current password for the root user.
- If prompted to Set root password, type Y and press enter.
- Input a new password when prompted and press enter. Important: Remember this password as it's required to configure WordPress later.
- Type Y for "Remove anonymous users" to remove anonymous users.
- Type Y for "Disallow root login remotely" to prevent root login remotely.
- Type Y for "Remove test database and access to it" to remove the test database.
- Type Y for "Reload privilege tables now" to reload privilege tables.
- Once done, you will see "All done!" and "Thanks for using MariaDB!".
- Access MySQL with root user and the password chosen earlier
bash
sudo mysql -uroot -p- Create the database named wordpress
bash
create database wordpress;- You should receive the response: "Query OK, 1 row affected (0.00 sec)" if there are no issues.
- Grant all privileges to the WordPress database
bash
GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost' IDENTIFIED BY 'insert your password';- Reload privileges
bash
FLUSH PRIVILEGES;- Exit from MariaDB with Ctrl + D
- Enable Apache rewrite module
bash
sudo a2enmod rewrite- Configure Apache by adding the following lines at the beginning of the
000-default.conffile
bash
sudo nano /etc/apache2/sites-available/000-default.confapache
<Directory "/var/www/html">
AllowOverride All
</Directory>Save and exit with Ctrl+O and Ctrl+X.
- Restart Apache
bash
sudo service apache2 restart- Open a browser (e.g., Google Chrome, Edge, Firefox) and visit the following link:
http://server_ip/wp-admin/setup-config.phpto continue with the WordPress setup wizard.
Fill in the basic site information following the screenshot

screenshot
