After Setting up LAMP server Download WordPress using wget into the directory /var/www/html/ and delete the default contents
sudo rm *
sudo wget http://wordpress.org/latest.tar.gz
Extract the contents of the file which creates wordpress directory
Move the contents of the extracted wordpress directory into /var/www/html/
validate the move 3 directories and 16 files by using tree command, Remove the tar.gz file then change the ownership of www-data to pi user
sudo tar xzf latest.tar.gz sudo mv wordpress/* . tree -L 1 sudo chown -R www-data: .
Next the database for the wordpress site needs to be setup by running the MySQL secure installation command.
Run mysql with root permission
sudo mysql -u root -p
After entering the password the Welcome to the MariaDB monitor prompt will appear. Create the database then grant root privileges, then flush the database privileges to apply the new privileges. A message confirming database was created will appear Query OK, 1 row affected (0.01 sec)
create database wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost' IDENTIFIED BY 'ROOTPASSWORD'; FLUSH PRIVILEGES; \q
*Pressing Ctrl+d will also exit MariaDB Prompt
The WordPress website should now be running. open web browser and enter http://localhost this should open the setup-config.php webpage.
***At this point an image of the sd card should be archived in case of data corruptions setting up WordPress.