wget http://wordpress.org/latest.tar.gzThis command will download the zipped wordpress package straight to your user's home directory. You can unzip it the the next line:
tar -xzvf latest.tar.gzStep Two—Create the WordPress Database and User
mysql -u root -pLogin using your MySQL root password, and then we need to create a wordpress database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon.
CREATE DATABASE wordpress; Query OK, 1 row affected (0.00 sec)Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer:
CREATE USER wordpressuser@localhost; Query OK, 0 rows affected (0.00 sec)Set the password for your new user:
SET PASSWORD FOR wordpressuser@localhost= PASSWORD("password"); Query OK, 0 rows affected (0.00 sec)Finish up by granting all privileges to the new user. Without this command, the wordpress installer will not be able to start up:
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password'; Query OK, 0 rows affected (0.00 sec)Then refresh MySQL:
FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)Exit out of the MySQL shell:
exit
cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.phpThen open the wordpress config:
sudo nano ~/wordpress/wp-config.phpFind the section that contains the field below and substitute in the correct name for your database, username, and password:
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'wordpressuser'); /** MySQL database password */ define('DB_PASSWORD', 'password');Save and Exit.
sudo rsync -avP ~/wordpress/ /var/www/Finally we need to set the permissions on the installation. First, switch in to the web directory:
cd /var/www/Give ownership of the directory to the apache user.
sudo chown www-data:www-data * -R sudo usermod -a -G www-data usernameFrom here, WordPress has its own easy to follow installation form online.
sudo apt-get install php5-gd
Article ID: 166
Created On: Tue, Dec 24, 2013 at 12:07 AM
Last Updated On: Sun, Jan 5, 2014 at 8:59 PM
Authored by: ASPHostServer Administrator [asphostserver@gmail.com]
Online URL: http://faq.asphosthelpdesk.com/article.php?id=166