Installing WordPress
Now that we are done installing the dependencies, the next step is getting the WordPress files in the HTML folder. Fortunately for us, WordPress provides a tar archive of the latest version of WordPress on this link: http://wordpress.org/latest.tar.gz. We now need to place the files contained in this folder in our web server folder. To do that, we first need to take ownership of the folder. To carry out that entire process, we execute the following commands:
$ cd /var/www/html/ $ sudo chown pi: $ sudo rm * $ wget http://wordpress.org/latest.tar.gz
In a nutshell, we first navigate to the HTML folder, take ownership of the folder, remove all the pre-existing files, and then fetch the WordPress archive. Next, we extract the contents of the archive and place them in the HTML folder. We do that with the following commands:
$ tar xzf latest.tar.gz $ mv wordpress/* $ rm -rf wordpress latest.tar.gz
Now, if you run the ls
command, you will see the following output: