sudo pacman -S wgetWe can download Wordpress straight from their website:
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.gz
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 cp -r ~/wordpress/* /srv/http/Additionally, make sure that PHP can connect to MySQL. Open up the php.ini file:
sudo nano /etc/php/php.iniFind the line and remove the semi-colon:
;extension=mysql.soThe line should now look like this:
extension=mysql.soRestart Apache:
sudo /etc/rc.d/httpd restartUPDATE: Since the introduction of systemd, the proper way of restarting Apache is by running the following command:
sudo systemctl restart httpdFrom here, WordPress has its own easy to follow installation form online.
Article ID: 215
Created On: Sun, Dec 29, 2013 at 6:22 AM
Last Updated On: Sun, Dec 29, 2013 at 6:22 AM
Authored by: ASPHostServer Administrator [asphostserver@gmail.com]
Online URL: http://faq.asphosthelpdesk.com/article.php?id=215