Install WordPress via SSH

Note: change “/var/www/html” to the directory where you want WordPress installed. Also, change “www-data:www-data” to the correct user:group for your flavor of Apache.

Ubuntu:

cd /

mkdir tmp

cd tmp

wget https://wordpress.org/latest.tar.gz (OR) curl -O https://wordpress.org/latest.tar.gz

tar xzvf latest.tar.gz

touch wordpress/.htaccess

mkdir wordpress/wp-content/upgrade

mkdir /var/www/html/**newnamehere**

sudo mv  -v /tmp/wordpress/* /var/www/html/**newnamehere**

sudo chown -R www-data:www-data /var/www/html/**newnamehere** && sudo chmod -R g+w /var/www/html/**newnamehere** && sudo find /var/www/html/**newnamehere** -type d -exec chmod 755 {} \; && sudo find /var/www/html/**newnamehere** -type f -exec chmod 644 {} \;

Go to your new location and run through the steps to set up WordPress (if you need to set up a database, instructions can be found here). After installation, you can run the following 2 commands to harden your install:

sudo chmod 660 /var/www/html/**newnamehere**/wp-config.php

sudo chmod 666 /var/www/html/**newnamehere**/.htaccess

By Sharon

Hello there! I'm a web developer in Louisville, Kentucky. I started on this career path by purchasing an O’Reilly PHP book from Barnes & Noble in 1999. Since then, my desire to learn as much as I can about web site building and server maintenance has grown. I love technology and what it can do to simplify our lives and make it more interesting all at the same time. Seeing a creative design come to life and bringing it into the web world is my favorite puzzle to solve. My server experience is based around launching WordPress-friendly servers — Linux (Ubuntu and Centos flavors), Apache, MySQL, and PHP. I have worked with various modules, extensions, installs such as ImageMagick, LetsEncrypt, Sass, LESS, and the Homebrew family of extension. My main love has been with PHP, and my CMS of choice has been WordPress since its inception in 2003. I find it flexible, secure, easy to design around, and so customizable. My strengths are in developing from-scratch plugins and themes for the WordPress CMS with a strong background in PHP and MySQL development.

Leave a comment

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