Activating multi-site support in installing Wordpress on VPS from Infobox in 5 minutes

    In this article, we will look at how to quickly launch several sites on VPS and cloud VPS from Infobox. Since the emergence of the Wordpress MU project and later became part of Wordpress, this process has been simplified. We have already added a template with the installation of Wordpress in 1 click (with FTP, database and phpmyadmin) in all VPS and cloud locations. The user can only configure Wordpress to support the launch of several sites if necessary. The article also shows the cloud-based VPS management interface.



    Setting up support for multiple sites in Wordpress on one server


    On a clean server, the multisite configuration process takes much longer than at this point, but we have already added a significant part of the configuration to the template with Wordpress, so the settings will take only 5 minutes. After ordering VPS Ubuntu with Wordpress or creating a server in the cloud from this template, log in to the server via SSH using the data for access from email. You will see an Infobox greeting and FTP access data and MySQL access data.



    Access data is unique and is generated at the time of server creation.
    Open the Wordpress installer web interface by going to the server’s ip address from a message or from the control panel.



    During the installation of Wordpress, access data to the server will be requested. All settings can be left by default, but you must specify the username and password from the database that were displayed in the server’s welcome message (if you changed them, you need to specify the ones that were changed).



    Get to the WordPress installation phase. Stop here. First we need to enable multisite.



    Let's return to our ssh – session to the server. Edit /var/www/html/wp-config.php and add the line above the phrase "/ * That's all, stop editing! Happy blogging. * /":
    /* Multisite */
    define('WP_ALLOW_MULTISITE', true);
    


    Re-open the site by ip-address in the browser, set the settings for the first site and install Wordpress.



    Log in. Go to the "Tools" -> "Network Installation" section.


    Wordpress tells you what to add to .htaccess and wp-config.php . Do this (in .htaccess replace the contents of the section) Please note that if the server IP-address changes, you will need to register a new one in wp-config.php. It is very important that when setting the settings in wp – config.php, write them above the phrases “/ * That's all, stop editing! Happy blogging. * /” .



    Log out and log in to Wordpress again.



    Now support for creating multiple Wordpress sites is activated.

    To be able to bind different domains to a multisite configuration, install the WordPress MU Domain Mapping plugin . Copy and enable sunrise.php:
    cp /var/www/html/wp-content/plugins/wordpress-mu-domain-mapping/sunrise.php /var/www/html/wp-content/sunrise.php(you need to copy the file each time the plugin is updated).
    Edit /var/www/html/wp-config.php and add the line above the phrase "/ * That's all, stop editing! Happy blogging. * /":
    define( 'SUNRISE', 'on' );
    

    Now log out and log in to your Wordpress dashboard again.

    Go to the "Settings" -> Domain mapping section and register the server ip.
    Now go to "Settings" -> Domains.



    Here you can add arbitrary domains to various sites. To find out the site ID, go to the "Sites" -> "All Sites" section and click "Edit" at the site to be added.



    In the address bar of the browser you will see the site ID.



    Return to the "Settings" -> Domains section and write down the relationship between ID and domain. Set the site as primary so that the selected domain is displayed in the address bar when entering the site. Also, do not forget to direct A record of the DNS domain to the ip-address of the server.



    Now, when entering the domain, the required site opens.

    Create a cloud-based VPS template with Wordpress and multi-site support


    We recommend that you create your own template so that in the future you can install support for several Wordpress sites in 1 click, changing only the ip-address in wp-config. To do this, go to the settings of the created server in the Infobox control panel, as shown at the beginning of the article. Click Create Image.



    Give the image a name and click Create. Now, if you need to deploy new servers with support for hosting multiple sites on Wordpress, you do not need to do all the settings from this article. You can simply go to the "Server Images" section in the Infobox control panel and create a server from the prepared image.



    VPS testing for free


    In order for you to try to enable multi-site support in Wordpress, we activated a free trial version of our VPS and, at the request of users, wrote a promotional code for registration right on the service page.

    If you can’t leave comments on the hub, you can write them in the InfoboxCloud Community .
    If you find a mistake or typo in the article, the author will be happy to correct it. To do this, please write to the PM.

    Successful use of cloud VPS from Infobox.

    Also popular now: