Follow these steps to import the restaurants platform in 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 right before the /* That’s all, stop editing! Happy publishing. */ text:
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 you change the “yourdomain.local” text with your own domain.
Once done, Save the changes.
2- Copy the database credentials from the “wp-config.php” file
We will copy the database credentials because then we will need them to edit the database we will import. By now, you can copy and save them in another text document.
- Open the WordPress installation folder
- Find 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' )
- Keep in mind that the username and password values will be unique, so don’t just copy the text above, but your own values in the wp-config.php file.
- Paste them temporarily in any other document, since you’ll use them later on.
3- Copy the platform files to the WordPress installation folder
Before copying the files, make sure you:
- Unzip the “Files.zip” file
- Purchase the premium plugins required for the platform
- Unzip each plugin’s content
- Copy each plugin’s folder to the wp-content > plugins folder
Now you need to copy the platform files to your WordPress installation folder. You can replace all the existing files.
4- Import the database
Open your local site database.
Select all the tables, and click on Drop to delete all the tables.
Now go to Import and upload the local.sql.gz file.
5- Add the old credentials to the “wp-config” 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 in the wp-config file.
Now scroll down and make sure you edit the following line:
define( 'DOMAIN_CURRENT_SITE', 'yourdomain.com' );
Add your own domain.
Once done, click Save changes.
6- Replace the URLs in the database
The database will contain http://restaurantmanager.local URLs, and you need to replace that local domain with your own local domain.
- Go to: yourdomain.com/Search-Replace-DB-master/index.php
- In Replace enter http://restaurantmanager.local and in the with field enter your site’s domain.
- Make sure you include the http:// or https:// protocol on your own domain so the replacement is correct.
- Now click on live run
Once the replace process is complete, you can do the same with the subdomains.
You need to replace these subdomains:
With something like this:
Once the process is complete, click on delete me to remove the search/replace utility from your WordPress folder.
Now you can start using the platform on your own domain.
Log in using the follwing credentials:
- Username: admin
- Password: password
Finally, you just have to go to your site’s wp-admin dashboard and activate the licenses for the premium plugins.