How To Set Up A WordPress Website On Ubuntu

Sites are also known as server blocks or virtual hosts.
Prerequisites: 
You must set up the following first:
Context: 
  • Domain name: yourdomain.com
  • Hostname: bluedroplet.yourdomain.com
  • Username: alex
Steps: 
  1. Install WP-CLI (WordPress Command Line Interface)
  • Go to your home directory.
cd ~/
  • Download WP-CLI.
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
  • Check that it works.
php wp-cli.phar --info
You should see your current PHP version and other details.
  • To access the command line tool by simply typing wp, move it into your PATH and ensure it has execute permissions.
chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp
  • You can now access the WP-CLI tool by typing wp
  1. Install WordPress
  • Go to the site’s public directory.
cd ~/sites/yourdomain.com/public
  • Download the latest stable version of WordPress into the working directory.
wp core download
  • Create a wp-config.php file using WP-CLI.
wp core config --dbname=yourdomain_com --dbuser=username --dbpass=password
  • Install WordPress and setup the admin user. Let’s call the admin user “alex”.
wp core install --url=http://yourdomain.com --title='Your Blog Title' --admin_user=alex --admin_email=hi@yourdomain.com --admin_password=password
  • Visit yourdomain.com on a browser and see the default Wordpress page.
 

  1. Done.


Popular posts from this blog

How To Set Up Quasar v0.14 On A Laravel+Vue Framework

How To Set Up Quasar v0.13 On A Laravel(5.4)+Vue Framework

How To Set Up NodeJs And Npm On Linux