Pantheon Community

Office Hours notes from 2019/09/25

We had a ton of Q&A in this week’s office hours call! Click through and follow along:

  • I have a WordPress site and various things on the site point to How can I quickly change them all to point to our actual domain?
    ANSWER: WP-CLI has a search-replace command that should get the job done for you. If you have Terminus installed, you can do something like this:
    terminus wp <site>.<env> -- search-replace --network
    You may need to run this multiple times to standardize with/without www, http/https and other older domains that may be found in the database. For more info, check out this WP migration doc.
  • Can one domain be used for multiple websites on Pantheon? I’d like to have my path point to two different sites.
    ANSWER: Sadly, no. However, there seem to be many alternatives to make the domain work how you want. There was recently a great conversation on Pantheon Community Slack and a different topic posted in this forum about this question.
  • Our customer’s site was hosted elsewhere. We started developing a new site for them on Pantheon. Before the new site was completed, they migrated the existing site to Pantheon. How do we now merge these to launch the site? Should we use the Terminus Site Clone plugin?
    ANSWER: The plugin could help. If you’re sticking to the same version of CMS you may be able to save some hassle by importing the database and files to a multidev of the existing site. If you don’t mind a little down time, you could put the Live site in Maintenance mode and move the new site through Multidev > Dev > Test > Live (overwriting the database and checking for bugs). As always, don’t forget to make a backup of Live! (And don’t forget to test that your backup works by loading it into a Multidev environment.) Alternatively, you could complete the site in its own Pantheon site dashboard, delete the domain from the old site, and add it into the new site. You still may have some down time, but you’d get the added benefit of having a clean break from the old site (without risk of losing the old site).
  • I’m new to Pantheon and this position. The previous developer is still marked as the “owner” but he’s not here anymore. How do I update that?
    ANSWER: Follow our doc on Accessing an Account After the Owner Leaves.
  • I don’t know what kind of development workflow our current developers are using on Pantheon. I like Lando. Is there any chance of a conflict?
    ANSWER: There shouldn’t be any problem using Lando on a site, even if nobody else is. You may also want to check out Pantheon Localdev, which has a GUI and is built on Lando.
  • We’re making regular modifications to the menu in our twig files. How do we clear our cache more easily? The menu is swapping out on demand based on path.
    ANSWER: Steve got to the root of the problem and suggested a single block that has logic, rather than doing that at the theme layer.
  • New to Pantheon and WordPress. We’re seeing a PHP error in the logs soon after taking the site live:
    Uncaught Error: Call to undefined function get_header() in /srv/bindings/63c...519/code/wp-content/themes/Divi/index.php:1 Stack trace: #0 {main} thrown.
    ANSWER: This error shows up anytime someone tries to visit the theme’s index.php file directly. That never happens on purpose unless a bot is looking for vulnerabilities. The good news is that this is normal and nothing to be concerned about. For more context from this discussion in the WordPress community.
  • What is the status of Bitbucket integration with the Terminus Build Tools Plugin?
    ANSWER: Our colleague Andrew Taylor is actively working on improvements to Build Tools. We don’t know exactly where things are at, but you can check in on the issue queue for this project.
  • Do you have any automated behavioral tests running out in the real world? Do you have any examples you can share?
    ANSWER: Steve has a custom behat function to log in as an admin and another to log in as a content administrator. Check out his example on Github.
1 Like