In this tutorial, we’ll show you how to import the platform on a local WordPress installation.
We assume you have downloaded the zip file called “restaurants-platform.zip”.
When you unzip the file, you’ll have a folder called “restaurants-platform”.
Inside that folder, there are two folders:
- files
- database
Note – We will refer to these folders throughout this tutorial.
1- Create a new local WordPress Multisite installation
Make sure you create a WordPress Multisite installation that uses subdomains.
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
- Paste the code below right above 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 replace “yourdomain.local” with your own local domain.
It should look something like this:
Save the changes on the wp-config.php file.
2- Copy the database credentials from the “wp-config.php” file
We need to copy the database credentials because we will need them later to edit the database we will import.
You can copy the credentials and save them in another text document.
- Go to your WordPress local installation folder
- 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’ )
Important – The username and password values will be unique, so don’t just copy the text from this page. Copy the values contained in your “wp-config.php” file of your local installation.
Paste the credentials temporarily in any other document; you will use them later.
3- Add the premium plugins to the platform files
As we mentioned at the beginning, the “restaurants-platform.zip” file will give you a folder called “restaurants-platform” when you unzip it.
That folder contains two folders inside:
- files
- database
You need to get the following premium plugins for this platform (click on the links to go get the plugins):
Once you have the premium plugins, unzip the .zip file of each premium plugin.
Now copy the folder of each plugin to restaurants-platform > files > wp-content > plugins.
4- Copy the platform files to your local installation
You need to copy the contents of the “files” folder to your local WordPress installation folder.
Make sure you accept to replace the existing files.
5- 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.
6- 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.
7- Replace the URLs in the database
The database contains URLs with the restaurantsplatform.local domain.
You need to change the root domain (restaurantsplatform.local) to your own domain.
In the browser, go to yourdomain.com/Search-Replace-DB-master/index.php and add the following values:
- Replace: restaurantsplatform.local
- With: mydomain.com
Finally, click on Search and replace.
Optional – Change “http” to “https”
If you want to change your from “http” protocol into “https” protocol, you can run another search and replace with these values:
- Replace: http://
- With: https://
- Click on Search and replace.
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.
8- Activate premium plugin licenses
Once you have imported the platform, you can login and start activating the premium plugins and/or making some changes.
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 used on this platform are free, except these:
Make sure you update plugins, themes, WordPress versions, etc.
Now you can start using your platform, making changes, etc.
In this tutorial, we’ll show you how to import the platform on a WordPress installation using cPanel.
We assume you have downloaded the zip file called “restaurants-platform.zip”.
When you unzip the file, you’ll have a folder called “restaurants-platform”.
Inside that folder, there are two folders:
- files
- database
Note – We will refer to these folders throughout this tutorial.
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; 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- Add the premium plugins to the platform files
As we mentioned at the beginning, the “restaurants-platform.zip” file will give you a folder called “restaurants-platform” when you unzip it.
That folder contains two folders inside:
- files
- database
You need to get the following premium plugins for this platform (click on the links to go get the plugins):
Once you have the premium plugins, unzip the .zip file of each premium plugin.
Now copy the folder of each plugin to restaurants-platform > files > wp-content > plugins.
4- Compress the platform files in a zip
In order to upload the platform files to your WordPress installation, you need to compress the files folder in .zip format.
5- 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.
6- 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
7- 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', 'yourdomain.com' );
Add your own domain instead of yourdomain.com
Once this is done, click Save changes.
8- Replace the URLs in the database
The database contains URLs with the restaurantsplatform.local domain.
You need to change the root domain (restaurantsplatform.local) to your own domain.
In the browser, go to yourdomain.com/Search-Replace-DB-master/index.php and add the following values:
- Replace: restaurantsplatform.local
- With: mydomain.com
Finally, click on Search and replace.
Optional – Change “http” to “https”
If you want to change your from “http” protocol into “https” protocol, you can run another search and replace with these values:
- Replace: http://
- With: https://
- Click on Search and replace.
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.
9- 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.
10- 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.