{"id":20818,"date":"2016-11-25T07:44:55","date_gmt":"2016-11-25T13:44:55","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=20818"},"modified":"2022-06-03T03:42:30","modified_gmt":"2022-06-03T08:42:30","slug":"manage-multiple-wordpress-sites-from-a-single-place-using-mainwp","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/manage-multiple-wordpress-sites-from-a-single-place-using-mainwp\/","title":{"rendered":"How to manage multiple WordPress sites from a single place using the MainWP plugin"},"content":{"rendered":"
<\/p>\n
In this tutorial, we will show you how to install two WordPress instances on separate virtual servers with Ubuntu 16.04 OS and Apache, PHP and MySQL<\/a> installed on them, and how to manage them from a single place using the MainWP <\/span>WordPress plugin. WordPress is one of the most popular free content management systems, written in PHP that allows web developers to build websites for any purpose. The MainWP dashboard plugin will allow you to manage your WordPress websites from one central location and get nearly complete control of all your WordPress based websites from the MainWP Dashboard. This tutorial was tested and written for an Ubuntu 16.04 VPS<\/a>, but it should work on any Linux distribution.<\/p>\n Let’s start with the installation. Download the latest version of WordPress available at https:\/\/wordpress.org\/latest.tar.gz to the first server and extract it using the following commands:<\/p>\n Create a new MySQL database for WordPress to use and assign a user to it with full permissions:<\/p>\n Do not forget to replace ‘yOur-passw0rd’ with a strong password. Then, run the following command:<\/p>\n Or, use the a2ensite to enable the ‘wordpress.conf’ configuration in Apache:<\/p>\n Edit the ‘wordpress.conf’ configuration file:<\/p>\n and add the following lines to it:<\/p>\n Optionally, add\/modify the following lines in php.ini configuration file:<\/p>\n Set the proper file permissions for the Apache web server to write to ‘\/var\/www\/html\/wordpress\/’ directory:<\/p>\n Enable the Apache2 rewrite module if it is not already done so:<\/p>\n Restart the Apache web server for the changes to take effect:<\/p>\n Copy the wp-config-sample.php file to wp-config.php :<\/p>\n Edit the wp-config.php file and change:<\/p>\n to<\/p>\n Repeat the same installation procedure on the second server where you intend to host the second WordPress website (do not forget to edit the Apache configuration file and replace ‘your-domain1.com’ with the actual domain name hosted on the second server).<\/p>\n [ecko_alert color=”blue”]Get one of our MainWP Hosting Plans<\/a> and we’ll configure and set up WordPress with MainWP for you, for free![\/ecko_alert]<\/p>\n Open your favorite web browser, navigate to http:\/\/your-domain1.com , then open a second tab and go to http:\/\/your-domain2.com , and follow the easy instructions to finish the WordPress installations on both servers.<\/p>\n Log in to the WordPress administration back-end of the first website, go to Plugins >> Add New >> and search for MainWP plugin, then install and activate the MainWP dashboard plugin. On the next page, click Let’s Go >> select ‘Web Host’ and click continue. If all MainWP dashboard plugin requirements are met, click continue. On the next page select the type of hosting (VPS) and the number of child websites you are<\/p>\n On the next page, click Let’s Go >> select ‘Web Host’ and click continue. If all MainWP dashboard plugin requirements are met, click continue. On the next page select the type of hosting (VPS) and the number of child websites you are<\/p>\n Next, select the type of hosting (VPS) and the number of child websites you are planning to manage (less than 50 or more than 50), then click continue.<\/p>\n Then, follow the instructions and continue with the MainWP dashboard plugin setup according to your needs.<\/p>\n To add a second WordPress website, click on the ‘Add New Site’ button, but make sure to go to the administration back-end of your second website and install and activate the MainWP Child plugin first. You can also turn on the ‘unique security ID’ option from the MainWP settings for extra security.<\/p>\n Then, go to the WordPress administration back-end of your first website. From the MainWP Dashboard plugin , click ‘Add New Site’ and add the URL of the second WordPress website, enter its administrator username and click on the ‘Add New Site’ button.<\/p>\n That is it. You can manage the WordPress installations from a single place using the MainWP plugin now.<\/p>\n
\n<\/span><\/p>\n
\nThis install guide assumes that Apache, MySQL and PHP are already installed and configured on your virtual servers. At the time of writing this tutorial, the latest stable version of WordPress is 4.6.1 and it requires:<\/p>\n\n
cd \/opt\r\nwget https:\/\/wordpress.org\/latest.zip\r\nmkdir -p \/var\/www\/html\/wordpress\r\nunzip -o latest.zip -d \/var\/www\/html\/<\/pre>\n
mysql -u root -p\r\nmysql> CREATE DATABASE wpdb;\r\nmysql> GRANT ALL PRIVILEGES ON wpdb.* TO 'wpuser'@'localhost' IDENTIFIED BY 'yOur-passw0rd' WITH GRANT OPTION;\r\nmysql> FLUSH PRIVILEGES;\r\nmysql> quit<\/pre>\n
\nCreate a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘wordpress.conf’ on your virtual server:<\/p>\ntouch \/etc\/apache2\/sites-available\/wordpress.conf<\/pre>\n
ln -s \/etc\/apache2\/sites-available\/wordpress.conf \/etc\/apache2\/sites-enabled\/wordpress.conf<\/pre>\n
sudo a2ensite wordpress.conf<\/pre>\n
vi \/etc\/apache2\/sites-available\/wordpress.conf<\/pre>\n
<VirtualHost *:80>\r\nServerAdmin admin@yourdomain.com\r\nDocumentRoot \/var\/www\/html\/wordpress\/\r\nServerName your-domain1.com\r\nServerAlias www.your-domain1.com\r\n<Directory \/var\/www\/html\/wordpress\/>\r\nOptions FollowSymLinks\r\nAllowOverride All\r\n<\/Directory>\r\nErrorLog \/var\/log\/apache2\/your-domain1.com-error_log\r\nCustomLog \/var\/log\/apache2\/your-domain1.com-access_log common\r\n<\/VirtualHost><\/pre>\n
memory_limit = 256M\r\ndefault_charset = \"UTF-8\"\t\r\n<\/pre>\n
sudo chown -R www-data:www-data \/var\/www\/html\/wordpress\/<\/pre>\n
sudo a2enmod rewrite<\/pre>\n
service apache2 restart<\/pre>\n
cd \/var\/www\/html\/wordpress\/\r\nwp-config-sample.php wp-config.php<\/pre>\n
define('DB_NAME', 'database_name_here');\r\ndefine('DB_USER', 'username_here');\r\ndefine('DB_PASSWORD', 'password_here');<\/pre>\n
define('DB_NAME', 'wpdb');\r\ndefine('DB_USER', 'wpuser');\r\ndefine('DB_PASSWORD', 'yOur-passw0rd');<\/pre>\n