Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
I'm going to setup a staging site, based on the current snapshot of my live site. I'll update the staging site to BL2, then workout any issues there. Once I've got the staging site, I can migrate all changes to live. The staging site will be in a completely different sub-folder (and I may even set it up under a sub-domain).
While I'm working on the staging site, I'll still have the live site running BL1. When I'm in Lightroom, I'll create some test albums and upload those to the staging site. This means I need BL2 installed within Lightroom.
My questions...
Can I have both BL1 and BL2 installed within Lightroom? I won't use BL1 during the entire time the staging site is under developed.
If I can't have both installed in Lightroom, if I upgrade to BL2 and don't modify/update any albums in the live site can I create/modify new albums for the staging site with BL2 and not effect anything on the live site of the existing BL1 albums.?
Otherwise, any recommendations on the workflow for keeping the live site on BL1 while I'm working with BL2 on the staging site?
Last edited by JimR (2019-02-04 02:18:21)
--Jim
Offline
If you’re referring to the TTG Publisher, it’s backward compatible with BL1. You can install the current version of Publisher without messing up your BL1 site. The cuttent version will replace the older version so there won’t be two Publisher plugins installed, just the one.
Other things to know about migrating your dev site: http://ttg-tips-and-tricks.barbeephoto. … tion-site/
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks Rod!
You've always been quick with helpful replies. You do have "too much time" on your hands (which is good for us).
Now that I know the BL2 Publisher inside of Lightroom is backwards compatible, I can update LR and continue with development on the new environment.
I've got a staging/development sub-domain setup as a clone of my current site (minus the 1,000+ photos). Your new guide on setting up a development site is helpful. Thank you!
My site is Wordpress, and I'm also using the BL WP theme. Setting up a clone of WP on a staging/development site is a bit tricky. Something you might add in your guide.
Here's a few things that might help others if they're using WordPress. It's advanced and only needed for WordPress users. Search the internet for articles about how to setup a WP staging/development site.
Some hosting services offer a staging tool to make this a one-click operation. That costs extra, and on the big sites I manage it's worth it. But for my own site, I can't justify the cost. So a WordPress staging/development site is a manual thing (and an advanced topic).
A few things to be aware of before starting:
In the staging/development site, add a robots.txt entry to block all crawlers. You don't want anything on that site crawled or indexed by search engines. Consider password protecting it to keep everything out.
The WP staging/development site needs it's own copy of the WP DB. Clone the DB, and then modify the WP config file in the staging site to point at the clone.
Update the new WP DB
Best to avoid making changes to WP while on the staging/development site. If you do, then the cloned WP DB will be different from the live/main site. Attempting to merge WordPress DB changes is something you'd rather avoid. This is very advanced. Just say no!
While working with WordPress on the staging/development site, keep your work isolated to just Backlight. Develop your WP theme and the rest of the customizations limited to Backlight.
You can create albums, upload photos, and experiment with all the features without effecting your live site.
Then when you're ready to update the live site, copy (not move) your BL files.
Further references:
https://www.wpbeginner.com/wp-tutorials … ress-site/
https://themeisle.com/blog/wordpress-staging-site/
--Jim
Offline
I’m currently doing something similar: updating my WordPress based Workshops site from a CE4 theme to Backlight 2.
I’ve already installed Backlight 2 in the Workshops site.
I’m designing the new theme in a subdomain and when happy with things I’ll export the BL2 page template and then import it into the Workshops site BL Designer. Then it’s just a matter of creating the theme and installing it in the Workshops WP installation.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
The WP staging/development site needs it's own copy of the WP DB. Clone the DB, and then modify the WP config file in the staging site to point at the clone.
I cloned the WP database in the past as well, but then it happened that I added new content to the staging area instead of my main site. Now I use a new WP database with just a few dummy entries. This way I see my changes, but it is obvious that this is the staging area.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
I cloned the WP database in the past as well, but then it happened that I added new content to the staging area instead of my main site. Now I use a new WP database with just a few dummy entries. This way I see my changes, but it is obvious that this is the staging area.
i've done it this way too. In fact, this time around I started with a clean WP install only to then find out I spent too much time configuring it (new WP DB, passwords, WP config, etc). I found it was just easier/quicker to clone the entire WP site.
Unfortunately, all too often I've not noticed I was modifying the staging site when I meant to be doing so on the main site. The opposite is also just as problematic. Moments ago I deactivated several plugins I didn't need/want on the staging site, only to later realize I had done so on the main site. D'oh!
I'm thinking there must be some quick trick to make it very clear which site i'm on. Maybe something like a yellow menu bar or something on the staging site just to make it clear where I am. We can even change the admin color scheme in the staging/development site too (e.g. I find the sunrise theme is really annoying).
I think I'll try that idea, now that I'm suggesting it. It's an easy thing to switch the BL theme for WP once I'm ready to publish live. For those not using the WP theme, it's not an issue.
--Jim
Offline
Hmmm.... You got me thinking.... and a few minutes later, I have my solution
I use a WP child theme and added this to my functions.php file:
add_action('wp_head', 'change_bar_color');
add_action('admin_head', 'change_bar_color');
function change_bar_color() {
echo '
<style>
#wpadminbar{
background: #7B0202;
color: #fff;
}
#adminmenu,
#adminmenu .wp-submenu,
#adminmenu .wp-has-current-submenu .wp-submenu,
#adminmenuback, #adminmenuwrap {
width: 160px;
background-color: #7B0202;
}
</style>
';
}
It's not perfect, but does the job for me. No more editing the wrong Wordpress installation! Yeah!
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
It's not perfect, but does the job for me. No more editing the wrong Wordpress installation! Yeah!
I hate it - exactly what I was thinking!
Hmm, but for some reason it's not working for me. I'm not finding the style being added.
I can manually paste the style into the Chrome inspector, and it works. Seems like the hook isn't being applied.
Last edited by JimR (2019-02-04 12:43:07)
--Jim
Offline
Is your WP child theme active?
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Is your WP child theme active?
Yes, I do use a BL child theme.
I only tried adding that code into the functions.php of the child theme. I'm wondering if that is even being called by the BL WP theme. There is the other one in the customizations folder of BL.
I was also thinking I could just add that css into styles.css of the child theme, but that also didn't work. That seems to indicate that file is also not being called by the child theme. I do have my styles in the customizations folder of BL.
Just now I saw there is a "custom css" field within the child theme's setting panel (within the WP admin). I pasted the style in there, and see the colored adminbar on the front-end. But that wouldn't cause the back-end to show a color adminbar.
I haven't spent more time on this, other than what I've mentioned above. I think functions.php and styles.css within the child theme's directory isn't being called.
This is probably documented. I haven't looked.
--Jim
Offline
Child themes documented here: https://developer.wordpress.org/themes/ … ld-themes/
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
To check if the child theme is working, I used following code in my child theme's style.css:
body {background-color: red !important}
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
There are two styles.css
/backlight/custom/css/styles.css
/wp/wp-content/themes/backlight-child/styles.css
I don't think BL is enquing the child theme's styles.
Only the one associated with BL, as that is chosen within the template, located within /custom/
If we add additional styles within the WP admin appearance panel for the child theme customization (the "Additional CSS" field), it does get included. That makes total sense. I've added it directly to the child theme.
But, as far as I know, nothing is enqueuing /wp/wp-content/themes/backlight-child/styles.css
As for this file...
/wp/wp-content/themes/backlight-child/functions.php
What is calling that? I don't think BL will do that by default. So I we are to add functions.php to modify the child theme, where do we add the call to that file?
Better yet, where would we add that code to not conflict with the production site, so we can keep the development code isolated to just the development site.
Had this horse died? Should we keep beating it? Actually, I'm curious and considering how to do this and I'm already invested in the answer
--Jim
Offline
Do you have a link to your site?
There is a small error: /wp/wp-content/themes/backlight-child/styles.css should be /wp/wp-content/themes/backlight-child/style.css
style.css and functions.php are used by Wp. You will not find any references to them in Backlight.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
There is a small error: /wp/wp-content/themes/backlight-child/styles.css should be /wp/wp-content/themes/backlight-child/style.css
[double facepalm]
Yes, it was a typo. I was typing the path by hand, and got the file name wrong in my comment. It's actually correct on my server.
Then I figured out what was going wrong. I started by cloning my entire environment from production to my staging/development site. All files and the database. Everything is working as expected. So I'm good to go, right?
Then I added the #wpadminbar style to fuctions.php so I'd get an ugly orange admin bar in both the front and backend. Oddly, the style was never being added. I tried everything obvious, clearing cache, disabling cache, adding debugging code, etc. I never found any of the php code being called.
Then I noticed my other typo. One that had been in my main theme for a couple years. I never noticed it, but it was easy to miss. There's only one small piece of code in there that did next to nothing on a rare occasion.
If you can spot it, the second typo is mentioned above.
Sometimes the problem is too obvious. I'll crawl back into my cave. Let me know when it's safe to come back out, after the laughter is over.
--Jim
Offline
Pages: 1