We will show you 4 possible ways of installing WordPress:
- with the console using wp-cli
- with the console using wget and browser
- FTP method
- Using web hosting provider auto installer
Installing wordpress with console using wp-cli
Step 1 – Installing WP-CLI
Use the clean VPS with the pre-installed LEMP, LAMP or VPS with VestaCP
Log into the root of your VPS and install wp-cli using these easy steps.
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar php wp-cli.phar --info
Once you are logged in as root, try to use the wp-cli command with –allow-root parameter.
php wp-cli.phar --info --allow-root
Then run these two commands:
chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp
Step 2 – Installing WordPress core
Go to public_html directory in your project and type the following two commands:
wp core download # or # wp core download —allow-root
Create the clean database and a new user with access to this database. Then type:
wp core config --dbname=db_name --dbuser=db_user --dbpass=MySeCrEtPaSs # or # wp core config --dbname=db_name --dbuser=db_user --dbpass=MySeCrEtPaSs --allow-root
See http://wp-cli.org/commands/core/config/ for more config parameters.
Step 3 – Creating Site
You can continue with the installation using the wp-cli command:
wp core install --url=http://example.com --title=MyWEB --admin_user=mycoolname --admin_password=secretsecret1 --admin_email=test(at)example.com # or # wp core install --url=http://example.com --title=MyWEB --admin_user=mycoolname --admin_password=secretsecret1 --admin_email=test(at)example.com --allow-root
See http://wp-cli.org/commands/core/install/ for more config parameters
or just finish the installation in your browser window.
Installing wordpress with console using wget and browser
Unlike the previous method with this method the configuration is totally web based and runs in your browser window. The wget command is used only to download the main wordpress zip package.
Step 1 – Downloading and unzipping worpdress
Unzip these two archives in your public_html directory or type into the subdomain directory:
wget https://wordpress.org/latest.tar.gz tar xzf latest.tar.gz mv wordpress/* . rm -rf wordpress latest.tar.gz
Step 2 – Configuring the database
Step 3 – Configuring the website
Installing wordpress via FTP
Unlike the Wget method all the files are copied via FTP access
Step 1 – Moving unpacked wordpress installation via FTP
connect to the server using your favourite FTP client
Unpack and copy the files from https://wordpress.org/download/ to your FTP directory
Step 2 and 3 are the same as in the previous methods
Installing wordpress using the auto installer from the provider
This is the easiest way. The only thing you need is to find out whether your provider has an option to run the auto installation of WP.
More info at https://codex.wordpress.org/Installing_WordPress