Skip to content

Instantly share code, notes, and snippets.

@maliMirkec
Created October 15, 2015 12:09
Show Gist options
  • Save maliMirkec/89b661a8fb8afa71f92d to your computer and use it in GitHub Desktop.
Save maliMirkec/89b661a8fb8afa71f92d to your computer and use it in GitHub Desktop.
Wordpress installation on Ubuntu
// connect to database
mysql -u root
// create new database for wp
CREATE DATABASE wordpress;
// check database user in vesta cp
// grant database user all privileges for wp database, admin_default is database user by default
GRANT ALL PRIVILEGES ON wordpress.* TO admin_default@localhost;
// flush the privileges so that the current instance of MySQL knows about the recent privilege changes
FLUSH PRIVILEGES;
// go to http://IP_ADDRESS/phpmyadmin/, login and check if you see new database wordpress
// now navigate to project folder
cd /path/to/project
// download wordpress
wget http://wordpress.org/latest.tar.gz
// extract it
tar xzvf latest.tar.gz
// general update
sudo apt-get update
// install required php libraries
sudo apt-get install php5-gd libssh2-php
// navigate to wordpress folder
cd /path/to/wordpress/folder
// copy default config file
sudo cp wp-config-sample.php wp-config.php
// edit wp-config file with correct db information, DB_NAME, DB_USER, DB_PASSWORD
sudo mcedit wp-config.php
// go to website and follow the instructions
// go to settings -> permalinks, choose 'custom' and write down '/%category%/%postname%/'
// voila, you're done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment