Press "Enter" to skip to content

How to download latest WordPress on Apache-based CentOS Server using Linux Command

Do you want to download latest version of WordPress on Apache-based CentOS Server using Linux Command?

What is WordPress?

WordPress is a free and open-source content management system based on PHP and MySQL.

Here’s are the easy step-by-step how to download latest WordPress on Apache-based CentOS Server using Linux Command:

Step 1 – Login to your server.

Before you proceed to the next steps, it is better to explain that all commands in this tutorial are written without the “sudo” prefix. However if you disabled root login and you logged in using another username with root privilege, you can add the “sudo” prefix all by your self. Alternatively you can simply type su, hit Enter and type in your password twice to switch login as root.

switch-root-login

You may also need to type this command to go to the root directory:

cd ~

Step 2 – Now go to your sites root directory and that’s can be “/var/www/domain.com/public_html” or “/var/www/domain.com/htdocs”. The root directory can be defined following my previous guide (see point 5 in Prerequisite section above). use this command to navigate to that folder

1
cd /var/www/domain.com/public_html

Once again, always replace “domain.com” with your actual site’s domain name.

install wordpress

Step 3Use wget command to download WordPress into your server. Here it is the command syntax to be issued:

1
wget http://wordpress.org/latest.tar.gz

It should be done within few seconds:

download wordpress to server

Step 4 – Extract WordPress package file. Issue following command:

1
tar --strip-components=1 -xvf latest.tar.gz

You can review all the files extracted using the ls command:

extracted files

Next, you can simply delete the “latest.tar.gz” file unless if you still need it:

1
rm latest.tar.gz