Skip to content

Instantly share code, notes, and snippets.

@edalzell
edalzell / server-migration.md
Created June 28, 2021 18:57
Migrate Servers

Preparation

The preparation of the migration should take place a few days in advance, based off the current TTL of the A record for the domain. To make sure everything runs smoothly I recommend doing this at least two days in advance.

  • Decrease the TTL of the DNS record to 300 in a few days in advance.
  • Create a new server with the server provisioner (i.e. Forge, Ploi)
    • Make sure to set up the timezone correctly on the server
  • Create a new site on the new server
  • Create a new database + corresponding database user
  • Make sure you can connect to the database from your local machine over SSH
@bgarrant
bgarrant / Automatic-Sitemap-XML-Generator-for-Statamic-CMS-Pages-and-Mounted-Collections.md
Last active July 28, 2020 17:02
Automatic Sitemap XML Generator for Statamic CMS Pages and Mounted Collections

How to automatically generate a Sitemap XML file using Statamic CMS.

This method will work for all Pages and Mounted Collections (just like Pages view in CP).

  1. Create a template called sitemap.html and add it to your theme/layouts/ folder.
  2. Add the following code to the new template
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ nav from="/" include_home="true" include_entries="true" exclude="our-team" }}