When you download the restaurants platform, you will have a file called “restaurants-platform.zip” on your computer.
When you unzip that file, you will find a folder called “restaurants-platform”, and inside it you will find two folders:
- files
- database
We will refer to these folders throughout this tutorial.
Here are the steps you need to follow to import the restaurant platform into a local WordPress installation.
1- Create a new local WordPress Multisite installation
Make sure you create a subdomains WordPress multisite installation.
If you already created a simple site, you can still enable the Multisite feature.
- Go to your WordPress installation folder
- Open the wp-config.php file
- Make sure the following lines are just before the text that says: /* That’s all, stop editing! Happy publishing. */
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'yourdomain.local' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
Make sure to change the text “yourdomain.local” with your own local domain.
It should look something like this:
Once this is done, save the changes.
2- Copy the database credentials from the “wp-config.php” file
We will copy the database credentials because we will need them later to edit the database we will import.
For now, you can copy them and save them in another text document.
- Open the folder of your local WordPress installation
- Locate and open the wp-config.php file.
- Find the following lines and copy them:
define( 'DB_NAME', 'username' );/** Database username */
define( 'DB_USER', 'username' );/** Database password */
define( 'DB_PASSWORD', 'password' )
Note that the username and password values will be unique, so don’t just copy the text from this page, but the values contained in the wp-config.php file of your local installation.
Paste the credentials temporarily in any other document, as you will use them later.
3- Copy the platform files to the WordPress installation folder
First, you need to unzip the “restaurants-platform.zip” file.
As we mentioned at the beginning, this file contains a folder called “restaurants-platform”, which contains two folders:
- files
- database
Second, you need to get the necessary premium plugins for this platform. You can go to the purchase page of each plugin by clicking on each title below:
Third, you need to unzip the .zip file of each premium plugin.
Each plugin will leave you a folder.
Fourth, you need to copy the folder of each plugin to restaurants-platform > files > wp-content > plugins.
Fifth, you need to copy the contents of the files folder to your local WordPress installation folder. If it asks you if you want to replace files, accept to replace.
4- Import the database
First, open the database of your local WordPress installation.
Second, select all the tables and click Drop to delete all the tables. This is because we need to clean the database to import the new data.
Third, go to Import and load the local.sql file which is in restaurants-platform > database.
Finally, complete the import.
5- Add the old credentials to the “wp-config.php” file
Go to your WordPress installation folder and open the wp-config.php file.
Remember we said you would use the old credentials from the wp-config file?
Now it’s time to paste the values into the wp-config.php file.
Note that you need to replace the data in the wp-config.php file with the new values.
After that, scroll down and make sure to edit the following line:
define( 'DOMAIN_CURRENT_SITE', 'yourdomain.com' );
Add your own domain.
Once you have done this, click Save changes.
6- Replace the URLs in the database
The database will contain URLs with the domain http://restaurantsplatform.local, so you need to replace that domain with your own local domain.
- In the browser, go to yourdomain.com/Search-Replace-DB-master/index.php.
- In Replace enter http://restaurantsplatform.local.
- In the With field, enter your site’s domain.
- Note: Be sure to include the protocol you are using (http:// or https://) in your own domain for the replacement to be correct.
- Finally, click Live run.
Once the replacement process is complete, you can do the same with the subdomains of the platform.
Our platform contains 4 main sites:
- The main site (http://restaurantsplatform.local)
- The frontend dashboard site (http://dashboard.restaurantsplatform.local)
- A WP Ultimo site template (http://template.restaurantsplatform.local)
- A test site (http://test.restaurantsplatform.local)
If you want to use different subdomains for these sites, you can replace those subdomains with other subdomains. For example:
- The main site: https://yourdomain.com
- The global dashboard site: https://admindashboard.yourdomain.com
- The site template: https://sitetemplate.yourdomain.com
- The test site: https://testsite.yourdomain.com
Upon completion of all database replacements, you can click “Delete me” to remove the search and replace utility from your WordPress folder, or you can keep it and just close the window.
7- Activate premium plugin licenses
Log in with the following credentials:
- Username: admin
- Password: password
Go to Network Admin > Plugins and activate the plugins using the licenses you purchased.
All plugins are free, except:
Now you can start using the platform on your own local domain.
You can make all the changes you want.
When you download the restaurant platform, you will have a file called “restaurants-platform.zip” on your computer.
When you unzip that file, you will find a folder called “restaurants-platform”, and inside it you will find two folders:
- files
- database
We will refer to these folders throughout this tutorial.
These are the steps you need to follow to import the restaurant platform to your site.
In this example, we will use cPanel.
1- Create a new WordPress Multisite installation
Notes:
- Make sure to create a WordPress multisite installation that uses subdomains, not subdirectories.
- Some WordPress installers may allow you to select whether you want to create a subdomain or subdirectory installation.
- Otherwise, at the end of this section you can see how to make sure your installation uses subdomains and not subdirectories.
If you are using Softaculus and cPanel, you can do it by following these steps:
- Go to the Softaculus App Installer section
- Click WordPress
- Click Install
- Select your domain and protocol
- Make sure to check the Enable Multisite (WPMU) checkbox
- Enter your site credentials
- Scroll down and click Install
To make sure your new WordPress installation is a subdomain network:
- In cPanel, go to Files and click File manager
- Find the folder where your WordPress installation was created. If it’s your primary domain, the WordPress files will be in the public_html folder.
- Find the wp-config.php file, right click and click Edit
Now make sure this line is in your wp-config.php file.
define ( 'SUBDOMAIN_INSTALL', true );
If not, you can add it to convert your multisite installation to a subdomain installation.
2- Copy the database credentials
In the wp-config.php file you should look for the following lines and copy them:
define( 'DB_NAME', 'username' ); /** Database username */ define( 'DB_USER', 'username' ); /** Database password */ define( 'DB_PASSWORD', 'password' )
- Note that the username and password values will be unique, so don’t copy the text from this page, but copy your own values in the wp-config.php file.
- Paste them temporarily into any other document, as you’ll be using them later.
3- Prepare the platform files to upload them
The first thing you need to do is download and unzip the file “restaurants-platform.zip”.
When you unzip it, you will get two folders:
- files
- database
Before uploading the platform files, you need to add the necessary premium plugins for the platform to work well.
For this, you need to buy these plugins:
When you buy them, you will download a .zip file for each plugin, so you will have to unzip them, and each plugin will give you a folder.
Having the folder of each plugin, go to restaurants-platform > files > wp-content > plugins, and paste the folders of the plugins.
Finally, you must compress the files folder in .zip format.
4- Upload the platform files
Now that you have the files ready:
- Go to Files manager in cPanel
- Open the WordPress installation folder that you are going to modify.
- Click Select All
- Click Delete to delete everything in this folder
- After deleting all the files, click Upload
- Once on the File Upload page, click Select File and upload the “files.zip” file from your computer.
- Go back to your WordPress installation folder and you will see the file you uploaded.
- Right-click the .zip file you uploaded and click Extract.
- Extract the files to your WordPress installation folder
- If it’s your main domain, the path will be /public_html. If not, you will know which folder is dedicated to the site you are modifying.
- Click Extract files
After that, all the files will be in the installation folder, and you can continue with the import of the database.
5- IMPORT THE DATABASE
- In cPanel, go to Databases and click on phpMyAdmin
- Select the database that belongs to the site you are editing.
- Tick the “Check all” checkbox
- Use the With selected dropdown menu and click Drop.
After deleting all tables from the database:
- Tick the Enable foreign key checkbox
- Click yes
- Go to Import in phpMyAdmin
- Click Choose File and locate the local.sql file in the restaurants-platform > database folder on your computer.
- Scroll down and click Go
- Once the import process is complete, you should see this message: Import completed successfully, X queries have been executed
6- Add the old credentials to the “wp-config.php” file
- In File manager, find the wp-config.php file
- Right click on it and click Edit
Remember we said you would use the old credentials from the wp-config file?
Now it’s time to paste the values into the wp-config.php file.
You have to replace the same lines in the wp-config.php file.
Now scroll down and make sure to edit the following line:
define( 'DOMAIN_CURRENT_SITE', 'tudominio.com' );
Add your own domain instead of yourdomain.com
Once this is done, click Save changes.
7- Replace the URLs in the database
The database will contain URLs with the domain restaurantsplatform.local.
You must replace that local domain with your own domain.
- Go to yourdomain.com/Search-Replace-DB-master/index.php
- In Replace enter http://restaurantsplatform.local and in the With field enter the domain of your site.
- Be sure to include the http:// or https:// protocol in your own domain for the replacement to be correct.
- Now click Live run
Once the replacement process is complete, you can do the same for the subdomains.
Our platform contains 4 essential sites:
- The main site (http://restaurantsplatform.local)
- The frontend dashboard site (http://dashboard.restaurantsplatform.local)
- A WP Ultimo site template (http://template.restaurantsplatform.local)
- A test site (http://test.restaurantsplatform.local)
If you want to use different subdomains for these sites, you can replace those subdomains with other ones. For example:
- The main site: https://yourdomain.com
- The global dashboard site: https://admin.yourdomain.com
- The site template: https://templatesite.yourdomain.com
- The test site: https://testsite.yourdomain.com
When all database replacements are complete, you can click Delete me to remove the search and replace utility.
8- Add the subdomains to cPanel
You have two options for the subdomains to work correctly.
THE FIRST OPTION IS TO ADD THE SUBDOMAINS MANUALLY.
HOWEVER, when you sell a new site, it will require manual setup.
- In cPanel, go to Domains > Subdomains
- In Subdomain, type the subdomain you want to add. In this example, you need to add these subdomains, one at a time:
- dashboard
- template
- test
- Note. If you changed the subdomains, add the new ones.
- Under Document Root, enter the path to your WordPress installation folder. If it is your main domain, it will be public_html
- Click Create.
The second option is to create a wildcard subdomain.
This is perfect if you have purchased a Wildcard SSL Certificate (which we recommend if you are going to sell sites). In this case, the new sites will not require manual configuration.
Note. In case your WordPress installation has automatically created a wildcard subdomain, you do not have to add the wildcard subdomain manually.
- In cPanel, go to Domains > Subdomains.
- In Subdomain, type an asterisk (*)
- In Root Directory, enter the path to your WordPress installation folder. If it is your main domain, it will be public_html
- Click Create.
9- Activate premium plugin licenses
Login with the following credentials:
- Username: admin
- Password: password
Go to Network Admin > Plugins and activate the plugins using the licenses you purchased.
All plugins are free except these:
Now you can start using the platform on your own domain.
You can make all the changes you want.
Final notes:
- Be sure to change these credentials to protect your site.
- In case you get any error related to Kadence theme not being compatible with your PHP version, try changing the PHP version in cPanel > Software > Select PHP Version or try using another theme.