Follow

How can I test or preview my website before switching DNS?

  • Applies to: Shared Hosting
    • Difficulty: Easy
    • Time: 10
    • Tools needed: AccountCenter access
  • Applies to: Premium WP / Managed WP Pro, Personal, Elite
    • Difficulty: Easy
    • Time: 10
    • Tools needed: AccountCenter access
  • Applies to: Managed WordPress
    • Difficulty: Easy
    • Time: 10
    • Tools needed: AccountCenter access
  • Applies to: Grid
    • Difficulty: Easy
    • Time: 10
    • Tools needed: AccountCenter access
  • Applies to: Legacy DV & VPS Hosting
    • Difficulty: Easy
    • Time: 10
    • Tools needed: Plesk or cPanel administrator access
  • Applies to: VPS Hosting
    • Difficulty: Easy
    • Time: 10
    • Tools needed: Plesk or cPanel administrator access
  • Applies to: DV 4.0
    • Difficulty: Easy
    • Time: 10
    • Tools needed: Plesk administrator access

Overview

There are a few different ways to preview your site before DNS resolves it to your (mt) Media Temple server.

Instructions

With Managed WordPress, you can use your access domain to preview your site. It will be similar to one of these formats: c00.000.mwp.accessdomain.com or c00.000.myftpupload.com.

  1. Log into your Media Temple Account.
  2. Select the blue ADMIN button associated with your Managed WordPress server.
  3. Locate your desired site and select Overview.
  4. Select Settings.
  5. Scroll to Domains. Your access domain will be listed in this section.
  1. Click on the Admin button to access your Managed WordPress control panel.
  2. Hover over the site that you'd like the access domain for and click on Manage Site.
  3. Click on Domains
  4. The access domain will be listed below Domains. 

Instructions

On the Grid, you can use your access domain to preview your site. It will be of the format, http://s00000.gridserver.com for your primary domain, or http://alternate.com.s00000.gridserver.com for alternate domains on your server. To find your access domain:

  1. Sign into your AccountCenter.
  2. Click on your primary domain.
  3. Click on Server Guide. Your access domain is shown in the first section.

You can also visit subfolders using the access domain, such as http://s00000.gridserver.com/blog.

On the Grid, you can use your access domain to preview your site. It will be of the format http://s00000.gridserver.com for your primary domain or http://alternate.com.s00000.gridserver.com for alternate domains on your server. To find your access domain:

  1. Sign into your AccountCenter.
  2. Click on your primary domain.
  3. Click on Server Guide. Your access domain is shown in the first section.

You can also visit subfolders using the access domain, such as http://s00000.gridserver.com/blog.

Plesk

Plesk comes with a built-in preview features that you may use to see your site before the domain is pointed through DNS. There are three types of previews, Limited Preview, Quick Preview on a Plesk domain, and Quick Preview on an external domain. By default, Limited Preview is already active on all of our DV servers. If you are not seeing all of your content load using this method, you may also change your preview settings to use one of Plesk's Quick Preview options.

To use Plesk's preview feature, use the following steps.

  1. Log in to Plesk.
  2. Click on Websites & Domains.
  3. Click Preview under the domain that you wish to preview.

Switching between Limited Preview and Quick Preview

To switch between Limited Preview and Quick Preview, use the following steps.

  1. Log in to Plesk.
  2. Click on Server.
  3. Select Website Preview from the General Settings column.
  4. Select the type of quick preview that you require. Quick Preview of a domain name in Plesk will allow you to use a drop-down menu where your available domains will be listed. For an external domain name, follow Plesk's instructions.  
  5. Click OK or Apply.

Using your IP to preview your site on a DV with Plesk

You can use your IP address to preview your site, but you must first designate a primary domain for that IP address in Plesk. You can change the primary domain as often as you want, so you can use the same IP to preview different sites.

To define which IP address a domain is assigned to, follow these steps:

1. Log in to the Plesk Control Panel for your domain.
2. Click on Tools & Settings.

3. From the Tools & Resources menu, select IP Addresses

4. Your IP address(es) will be listed. Click on the specific IP address you are working with to continue.
5. From the Default site menu, select the domain you'd like to assign to this IP address.
6. Click the OK or Apply button to save your changes.

cPanel

To preview your site on a DV with cPanel, you only need to use the IP of the server, which you can find in you Server Guide in the Account Center, and the username of the cPanel account the domain is on.

Finding your IP

  1. Log in to the Account Center.
  2. Click on the domain you want to preview.
  3. In the DV Control Panel click on View Your Guide in the Server Guide panel.
  4. Scroll down to the DNS section and your IP address will be located here.

Finding your username

  1. Log into the desired cPanel account.
  2. The username will be located under the General Information tab.

    cPanel_-_Main.png

    Note: The screenshot above is using cPanel's paper_lantern theme.

 

Loading your site in the browser

Once you have your IP, you can simply use the following in your browser's address bar.

http://255.255.255.255/~username

 

In the example above, you would replace "255.255.255.255" with the IP of your DV server and "username" with the username of your account.

Preview doesn't load

If your site preview does not load, then you may need to log into WHM and check Apache mod_userdir Tweak to ensure mod_userdir is enabled for your domain.

cpanel2.png

 

If your site uses PHP and the preview is prompting a "Not Supported" message, then you may also need to update the PHP handler (for example from CGI to SuPHP). To change a PHP handler:

1. Log into WHM.
2. Navigate to EasyApache.
3. Select Customize next to your package.

easyapache1.png

4. Navigate to Apache Modules and enable mod_suphp.
(tip: you can use the search bar to help locate the module)

 

easyapache2.png

5. Click on Review.

easyapache3.png

6. Then scroll to the bottom of the Review page and select Provision to save your changes.

easyapache4.png

7. While still in WHM, navigate to MultiPHP Manager.

easyapache5.png

8. Click on PHP Handlers.
9. Locate your desired PHP version and select Edit to select the desired handler.

easyapache6.png

 

Previewing your site with HOSTS file

To test your website with your own domain name before DNS propagation has completed, you can use your local computer's HOSTS file. Your computer will use the entries in your HOSTS file before it looks up the DNS information for your domain. When you are finished testing, remember to remove the custom lines that you added.

You will need to know your server's IP address in order to complete the instrutions below. If you don't know this information, feel free to review the article below:

A few things to note

Certain features on your site may not work as expected if you are not using the actual domain name in the URL.

  • WordPress sites and other websites may force a rewrite of the URL to the domain name, so the site may redirect to your previous host, or may not display at all. You can either temporarily update the WordPress URL to your preview URL, or read below for another option.
  • Files called with absolute rather than relative links will still be pulling data from your previous host.
  • SSL certificates, and visiting sites over HTTPS will work without errors only with the exact domain name.

PLEASE READ BEFORE CONTINUING:
(mt) Media Temple is not responsible for custom configurations on your local computer. The following was created as a courtesy to assist customers. If you are uncomfortable with editing configuration files on your computer, please do not follow the instructions below.

Windows

While following these instructions be sure to replace "70.32.88.203" with your actual server IP address, and "example.com" with your actual domain name.

  1. Locate the HOSTS file on your computer. Typically it is in one of the following locations:
    • Windows NT/2000/XP/2003/Vista/7 - C:\windows\system32\drivers\etc\hosts
    • Windows 95/98/Me - C:\windows\hosts
  2. Open this file with a text editor such as Notepad or Wordpad.
    • Right-click on Notepad and select the option to Run as Administrator - otherwise, you may not be able to open this file.
    Then, open the file. Consider performing a "Save As" so you have an original copy of the file that you can restore later. You will see two columns of information, the first containing IP addresses and the second containing hostnames. By default, a windows hosts file should be similar to the following:

    Filename: hosts

    127.0.0.1 localhost

    You can add additional lines to this file that will point requests for a particular domain to your new server's IP address. Example:

    Filename: hosts

    127.0.0.1 localhost
    70.32.88.203 example.com
    70.32.88.203 www.example.com
    
  3. Save your changes.
  4. Restart any currently open browsers. You may also want to flush your DNS cache. In Windows XP, go to Start, and then Run, then type "cmd" and hit enter. Type the following:
    ipconfig /flushdns
  5. Visit your new site using http://example.com or http://www.example.com/

Mac OS X

While following these instructions be sure to replace "70.32.88.203" with your actual server IP address, and "example.com" with your actual domain name.

  1. Open Terminal, which is in Applications, then the Utilities folder.
  2. You may want to first make a backup copy of your existing hosts file:
    sudo cp /private/etc/hosts /private/etc/hosts-orig

    Enter your user password at the prompt.

    Type the following command to edit your hosts file:

    sudo vi /private/etc/hosts

    Enter your user password at the prompt.

  3. You will see a file with contents similar to the following:

    Filename: hosts

    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ##
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost
    

    Add your domain and IP address to the bottom of the file. For example:

    Filename: hosts

    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ##
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost
    70.32.88.203 example.com
    70.32.88.203 www.example.com
    

    vi tip:

    Press "i" to enter "insert mode" so you can type and copy/paste. Press "Esc" to exit "insert mode" when you are done modifying the file. Type ":wq" to save and quit.

  4. You may also need to grant yourself sudo privileges if you got a permission error in Step 2. In your "Help" menu, search for "root" and select the instructions for "Enabling the root user." Follow these.
  5. Restart any currently open browsers. You may also want to flush your DNS cache:
    dscacheutil -flushcache
  6. Visit your new site using http://example.com/ or http://www.example.com/
Was this article helpful?
0 out of 1 found this helpful

Comments