Do your TTG site development in a sub-domain

This tip can save you some time and headache.
As you may know, to view your site created in TTG Pages you need to view it online or on a virtual server. Virtual server testing has advantages like speed of use. But you’re not testing on a live site and you can’t share the site with others to get feedback.

Don't forget the Site URL field!
Don’t forget the Site URL field!

Most people who are replacing their old site with a new one would rather keep the old site up while creating the new. That makes sense. One idea is to set up a test site in a sub-folder, and I do that a lot just for testing purposes. One thing you’ll have to remember when using a sub-folder to develop your new TTG site is that you need to enter the url to the site in the Site Root field in the Site Info control pane under Website. When working in a test folder, the url needs to include the sub-folder or all sorts or style and formatting hell will break loose. For a test folder in the root you can simply use /test-site/.

If you use a sub-folder, this means you’ll need to change the Site Root again once you put the ready-to-go site into the root of your server. You’ll need to change it in Pages and in any Publisher templates, galleries, indexes, Stage pages, etc.

But, if you set up your test site in a sub-domain rather than a sub-folder, you can simply use the forward slash (/) as the site root. And when you’re ready to go live, you won’t need to change your Site Root field in any of your pages.

If you don’t know how to create a sub-domain, just log into your web host’s control panel. It’s usually as easy as clicking on a link or button labeled sub-domains and following the prompts.
You’ll end up with a new folder in the root of your site. To all appearances, this just looks like a sub-folder, so what’s the big deal? The big deal is that the server treats the new sub-domain folder as if it’s the root of a site. You’ll see all sorts of extra files in there like 400.html and 500.html. These are just standard pages users are sent to for errors or missing pages. So don’t worry about them.
The web address to your new sub-domain will be in the form:
http://your-sub-domain.yoursite.com

Upload the contents of your TTG Pages export to the “your-sub-domain” folder (please don’t name it that). Enter the url to your sub-domain into your browser and you’ll be taken to your shiny new test site.
When you’re ready to go live you can use your FTP client program to just move the files in your sub-domain into the root of your server. This is usually as easy as selecting everything in the sub-domain folder and dragging it into the root of your site.

If you’re using Publisher you will need to change the URL to the API folder in the Publisher plug-in. But that should be all. The files on the server that Publisher uses to manage your Albums and Album Sets contain relative references to those Albums and Album Sets. This means that Publisher can still manage them. (this may not be true for CE4 sites. I’m waiting on confirmation)
My suggestion though is to limit the number of Albums or Sets you create. Just create one or two as a test of functionality. Then delete those albums and Sets from within Publisher in Lightroom and re-establish the Publisher connection and start populating your site with albums once you’ve moved everything over.

One Gotcha

If you’re setting up phplugins with your test site, you’ll need to enter the server path to phplugins in all of your indexes, galleries, Publisher templates, and other pages. The server path for the sub-domain will be different than the server path for the root. If the server path to phplugins for the sub-domain looks like this: /home2/yoursite/public_html/my-sub-domain/phplugins then the server path to phplugins for the root will look like this: home2/yoursite/public_html/phplugins.
In this case you will need to make the change in Pages and each template, index, and gallery and re-export. Now just upload everything to the root of the site. It’s a good idea to keep your test site limited in this case so you won’t have a lot of re-exporting to do.

One way around this is to initially set up the phplugins/ folder in the actual root of your server where the actual site will live and enter the server path to that file in Pages and any other TTG gallery, index or other page you’re using in your test site. In fact, the next time I decide to do a site redesign, this is exactly how I’m going to do it.

2 thoughts on “Do your TTG site development in a sub-domain”

  1. For all the obvious reasons I will develop/convert my existing site in a “test” environment. As a development and test site, do you still recommend a sub-domain over sub-folder?
    Thanks for your help.
    Franz

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About this site

This site is: a repository of time-savers and best practices from a user's perspective, picked up from several years of using TTG plugins.
This site is not: a support site.
Read more here.

Subscribe to new posts

Tip Jar

If this site has saved you some time, kept your hair attached, or otherwise prevented you from tossing the mouse through the monitor, feel free to donate.

Categories


Highly recommended. This is my go-to Lightroom book. Click on the book image. (affiliate link)

Affiliate link!

Current TTG versions

Backlight  4 & 5

See the Backlight Modules page on your site for latest Backlight and module versions and changelogs.

You’ll also find the latest version number and download link for the Lightroom Publisher plugin.
(BL 3 and later)

 

Backlight 1 Versions

Backlight 1.2.4
Pages module 1.2.4
Cart Add-on 4.1.7
Client Response Add-on 7.1.3
Theater Add-on 1.2.6
Galleria Add-on 1.0.0
WordPress Add-on 1.2.6
Publisher 3.2.3

Backlight 1 has seen its end of life. See this post.

CE4 Versions

note: CE4 is no longer being developed or sold. See this post.

TTG-BE: 2.0.5a
Autoindex: 7.0.8
Cart: 3.1.4a
CRG: 6.1.3a
Gallery: 6.1.10
Pages: 7.0.15
Publisher: 2.3.3
Stage: 6.1.6
Theme for WordPress: 3.1.2