WordPress multisite- LAMP install on CentOS.

installed centos 7 minimal os
yum update
yum upgrade

If need GUI do the below steps..

1. Install CentOS-7 – Minimal (First entry point in list)
2. yum groupinstall “X Window System”
3. yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts
4. unlink /etc/systemd/system/default.target
5. ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
6. reboot

yum install python-matplotlib

install LAMP

yum update

yum install httpd -y

systemctl enable httpd.service

firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --zone=public --permanent --add-service=https

systemctl restart firewalld

yum install mariadb-server mariadb

systemctl start mariadb

systemctl enable mariadb


Set root password? [Y/n] y
New password:
Re-enter new password: ---> Xpress@567
Password updated successfully!
Reloading privilege tables..
... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

php -v

upgrade php 5.4 to 5.6

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum remove php-common

yum install -y php56w php56w-opcach php56w-xml php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring

systemctl start httpd.service or service httpd restart

php -v

To test php:-

vi /var/www/html/info.php



mysql -u root -p

create database bitnami_wordpress;

CREATE USER ‘bn_wordpress’@’localhost’ IDENTIFIED BY ‘hgffhyt878687’; —> change password

GRANT ALL PRIVILEGES ON bitnami_wordpress.* TO ‘bn_wordpress’@’localhost’;



yum install wget unzip net-tools -y

cd /var/www/html/

wget http://wordpress.org/latest.zip

unzip latest.zip
chown -R apache:apache /var/www/html
chmod -R 755 /var/www/html
mkdir -p /var/www/html/wp-content/uploads
chown -R :apache /var/www/html/wp-content/uploads
cd /var/www/html/
cp wp-config-sample.php wp-config.php

####Multiple site configuration

vi /var/www/html/wp-config.php

/* Multisite */
define(‘WP_ALLOW_MULTISITE’, true);

/* That’s all, stop editing! Happy blogging. */ — copy content above this word..

###########enable rewrite

vi /etc/httpd/conf/httpd.conf

# Options FileInfo AuthConfig Limit
AllowOverride All

service httpd restart

Add the following to your wp-config.php file in /var/www/html/wordpress/ above the line reading /* That’s all, stop editing! Happy publishing. */:

define(‘MULTISITE’, true);
define(‘SUBDOMAIN_INSTALL’, false);
define(‘DOMAIN_CURRENT_SITE’, ‘’);
define(‘PATH_CURRENT_SITE’, ‘/wordpress/’);
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOG_ID_CURRENT_SITE’, 1);

Add the following to your .htaccess file in /var/www/html/wordpress/, replacing other WordPress rules:

RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Once you complete these steps, your network is enabled and configured. You will have to log in again.

Leave a Reply

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