Download WordPress

Download And Unpack WordPress

Here’s where WordPress makes its entrance. You can either head over to the https://wordpress.org and download it that way, or just use wget. The URL never changes, so wget will always work.

$ cd Downloads
$ wget https://wordpress.org/latest.tar.gz

Unpack WordPress using tar.

$ tar xpf latest.tar.gz

The resulting folder will be wordpress. It contains the entire WordPress install. How and where you copy it is entirely up to you and depends on your web server configuration. The example provided covers the most basic possible install on Apache.

# rm -rf /var/www/html
# cp -r wordpress /var/www/html

If you’re using Nginx, you probably just want to place the folder in /var/www/ as it is, and point your configuration at it. When WordPress is where you want it, change the permissions and ownership to improve security and grant your webserver proper access.

# chown -R www-data:www-data /var/www/html
# find /var/www/html -type d -exec chmod 755 {} \;
# find /var/www/html -type f -exec chmod 644 {} \;

Certainly, if your webserver is configured to run under a different user, change the ownership to that one.