Setup a new wordpress server
From Notes_Wiki
<yambe:breadcrumb>Wordpress_configuration|Wordpress configuration</yambe:breadcrumb>
Setup a new wordpress server
- Get system ready with requirements as listed at https://wordpress.org/about/requirements/ For example at time of writing the requirements are at least PHP 5.6, Mysql 5.6 (or MariaDB 10.0).
- For CentOS 6.x refer to https://www.sbarjatiya.com/notes_wiki/index.php/Install_php_5.6_on_CentOS_6.x
- yum -y install php56w
- yum -y install php56w-mysqlnd
- yum -y install php56w-xml
- yum -y install php56w-gd
- For CentOS 6.x refer to https://www.sbarjatiya.com/notes_wiki/index.php/Install_php_5.6_on_CentOS_6.x
- yum -y install mysql-server
- Start mysql, create user and database for wordpress
- service mysqld start #or systemctl start mysqld
- chkconfig mysqld on #or systemctl enable mysqld
- /usr/bin/mysql_secure_installation
- mysql -u root -p
- CREATE DATABASE wordpress;
- GRANT ALL ON wordpress.* to 'wordpress'@'localhost' identified by 'secret';
- FLUSH PRIVILEGES;
- \q
- Download latest version of wordpress from https://wordpress.org/download/
- Start apache web server
- service httpd start #or systemctl start httpd
- chkconfig httpd on #or systemctl enable httpd
- Go to document-root and extract all wordpress files:
- cd /var/www/html
- tar xzf <path-to-wordpress>.tar.gz
- mv wordpress/* .
- rmdir wordpress
- Copy sample config and update database values
- cp cp wp-config-sample.php wp-config.php
- #edit wp-config.php and put database user wordpress, database wordpress, password secret, etc.
- #Configure random values (mkpasswd -l 30 -s 5) in various SALT and KEY values
- Open http://<IP or FQDN>/ and enter site name and other details. Click 'Install WordPress' to install wordpress. Note that the installation may take considerable time.
<yambe:breadcrumb>Wordpress_configuration|Wordpress configuration</yambe:breadcrumb>