From Metro Studios Knowledgebase
 Creating a Local Site
 Local References
First things first, we need to have local references to whatever site you are working on. To start, you need to have EasyPHP running (Apache and MySQL services should both be active) Once you have EasyPHP running, go to http://localhost . On this site, you will see a box where you will enter the domain name (including the extension) See the image below for an example
The only thing you need to worry about at this step is within the "Add A Site" box. You will type the domain name of the site you are working on into this text box.
Note: in this step you can select "www.". This option will determine how you access the site locally at later steps.
Press "Add" when you have entered what you want within the text box.
 Pull Git Repo
Now that you have a local reference created for the site, you will need to pull down the site files from the server. To do this, we use a program called Git, version control software, to have repositories that we can pull down locally and edit. There are two different sets of instructions here depending on whether you choose to use Git via the command line in SSH or through the Git GUI installed on your machine. Both ways work the same, it just depends on your personal preference.
The Git GUI is more user friendly for people who may not know how to use a command line
 Git GUI
When you open Git GUI, you should see a window come up that looks like:
On this page, if you do not already have the Repository for this site, you will need to click on "Clone Existing Repository".
You are now prompted to enter in a Source Location and a Target Directory. The Source Location can be obtained from Git_Versioned_Sites. On this page, you will see a list that looks like:
Find your site within this list and copy the data in the "Clone String" box associated with your site and paste this into the Source Location of the Git window. If for some reason you cannot find the site within the list, it may be because it has not been added or the site does not have a repository. The layout of the "Clone String" is as follows:
To break this down more:
- USERNAME = you will replace this with your Server Username that you were assigned
- web1.metro-studios.com = This is the server that your site is hosted on, if you found your site within the Git list, you don't need to do anything with this
- :11200 = This is the port that you connect to the server with. You do not need to change this.
- /var/www/vhosts/metro-studios.com/httpdocs.git = This is where the repository exists on the server. If you found your site within the Git list, you don't need to do anything with this
The Target Location is where you will be storing the site on your local machine. Assuming that you did not skip the steps in the Pull Git Repo section above, you will need to enter this:
You will need to enter the domain of your site where DOMAIN is.
After you have done this, press "Clone".
You will then be prompted to enter your password three times.
When this window pops up, you have successfully pulled your site down with Git
 Git SSH (Older)
Most of the sites have a very basic git workflow. With these old sites, Dev sites are kept separate from their live site counterparts. Locally, work is done on a clone of the "master" branch of the dev site. Once the dev site is approved, the entire repository is cloned to the live site, and the "master" branch is what gets displayed to the browser. Because of this, it happens quite often that dev sites become outdated when changes are pushed directly to the live site.
No matter if you are cloning a dev site or a live site, the process is the same (substitute "webX" with the appropriate server name):
Navigate to the correct site.
Clone the Repository
git clone ssh://USERNAME@webX.metro-studios.com:11200/var/www/vhosts/SITE_DOMAIN/httpdocs.git
 Git SSH (Newer)
Some newer sites incorporate a branched git workflow that allows the dev site to exist as a working copy of the live site. The dev site is split into a "master" branch and a "dev" branch. The live site also has a "master" and "dev".
Work is done on a clone of the "dev" branch of the dev site. Once the dev site is approved, these changes are then pushed across to the "master" branch of the dev site, and this master branch is then pushed to the "master" branch of the live site.
This is to hopefully prevent any changes from being pushed directly to the live site - without going through the dev site first. This is turn keeps the dev site up to date with the live site, provides an extra step in revision rollback options, and allows major changes to be sidelined when minor updates need to be pushed out quickly, without losing changes already committed to the dev site.
The cloning process for these sites is a bit different (we will always be cloning the dev site):
Navigate to the correct site.
Clone the "dev" Branch of the Dev Repository
git clone ssh://USERNAME@dev1.metro-studios.com:11200/var/www/vhosts/SITE_DOMAIN/httpdocs.git --branch dev --single-branch
 Set up Local Back-end
Now that you have successfully pulled the site files, we need to get the Database so that your local version will have all of the information that has been entered into the Database.
First things first though, we need to determine if your site has our Boost CMS installed.
 Boost Core
To do this, navigate to
making sure to replace DOMAIN with your site's domain and look for a directory/folder named
If there is a folder/directory with this name, then the site has the Boost CMS installed. If not, then you can skip the rest of this step.
Navigate back to http://localhost and find your site within the Drop down menu called "Install/Update Boost Core"
This Boost Core is ignored by Git, so if you plan on working on a Boost site locally, you need to get this.
 Retrieve Database
The next step will be to obtain the Database structure and data from our servers. Recall back to what server your site was located on and go to the appropriate Web interface:
- Web1 = https://22.214.171.124:8443/login.php3
- Web2 = https://126.96.36.199:8443/login.php3
- Web3 = https://188.8.131.52:8443/login.php3
- Web4 = https://184.108.40.206:8443/login.php3
You can obtain the login credentials for each server through KeePass.
Once you have logged in, you will see this section on the page:
Click on phpMyAdmin.
A new window should have opened with the Database interface.
 Manually Retrieve Database
- Install Boost via localhost and detrimine DB name in _boost/bootstrap.php
- Go to http://SERVERNAME.metro-studios.com:8443
- Get login from Kee Pass > Server Admin Web Portals
- Go to: Tools & Settings > Apps & Databases > Database Servers
- Click "Local Mysql Server"
- Click the Database tab > Web Admin Icon > Click the Export tab > Custom Button
- Select site database
- Tick view Output as text and click Go
- Select and copy all the text and past into a Notepad++ doc
- Go back to localhost click phpmyadmin
- Select the SQL tab
- Copy all the text from your Note Pad++ doc paste it into the sql field and click GO
- Open _boost/bootstrap.php and get the database username and password
- If user doesn't exist under users in privileges tab, create new
- Selet local under host
- Database specific privilages add name of site database in dropdown (this may have to wait until after step 4
- Check all boxes (quick link at the top of panel)
- Click GO