How to install WordPress with command line? (2 ways)

0
(0)

There are 2 ways to install WorPress site via command line interface (cli) . To install, we need access via SSH (if you have your own VPS / Dedicated server)

  1. Using download link

Open ssh-console using your favourite ssh-client (PuTTY, MobaXterm, SmarTTY, DamewareSSH Client etc.) and enter following commands:

cd /path/to/your-webserver-root-or-folder 
curl -O https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress/* .
rm -R wordpress/
rm latest.zip
mv wp-config-sample.php wp-config.php

What was done:

cd – go to the folder where WordPress will be installed

curl.. – downlod wordpress package archive

unzip… – extract archive

mv.. – move archive files from folder wordpres to root folder

rm… – remove folder wordpress

rm… – remove latest.zip

mv – rename simple config to current config file.

2. Using GIT repository

So, to install WordPress from the command line, we need GIT. Actually that’s all. Let’s start:

Open ssh command line

Put in folder wich install wordpress.

git clone git://core.git.wordpress.org/ folder_name

folder_name – folder to install wordpres, like /var/www/html

cd folder_name

… and remove .git

rm -rf .git/

All the latest version of WP downloaded. Now we set it up.

wp-config
Before we begin we need to create a new MySQL database.
After creating the database, rename wp-config-sample.php → wp-config.php
Edit wp-config.php
Fill in the MySQL settings
Copy the content from https://api.wordpress.org/secret-key/1.1/salt/ and replace it in the right place in wp-config.php
We change $ table_prefix = “wp_” to our. For example, “prefix_”

Installation

We start the url with our site in the browser. A setup window should appear.
We go on points.

So we meet with two ways to install WordPress from the command line. Thanks for reading!

Similar Posts:

1,889

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

1 thought on “How to install WordPress with command line? (2 ways)”

  1. Exploring hemp products and pre roll weed has been an enlightening journey instead of me. The quality and smell of these products are exciting, offering a calming and enjoyable experience. Whether I’m unwinding after a extensive light of day or seeking original inspiration, hemp pre-rolls plan for a commonplace alternative that I can trust. The convenience of pre-rolls combined with the benefits of hemp flowers occasion them a go-to choice for off and mindfulness. I perceive the limelight to charge and harmlessness of the products, enhancing my complete satisfaction. Greatly subscribe to tough hemp flowers and pre-rolls in place of a holistic and fulfilling sagacity!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top