FDPUB

FDPUB is our bright shiny brave world where all the websites from all the clusters are living in perfect harmony.

Goal: to have all origin sites as a clone for development in our FDPUP cluster.

To reach this all origin websites must be cloned to FDPUB.

Clone single multi site from one of our other clusters to FDPUB

Network / Domains

[add documentation how to add a new domain to the cluster on the VIP dashboard.]

We only need 1 stage per Website. As name convention we use:

[origin-website-domain].fdpub.de

In the rare case there is need for more stageing per website do this:

[origin-website-domain]-dev.fdpub.de

Database import

  1. Make a backup of fdpub database!
  2. Add new Domain to the cluster: https://dashboard.wpvip.com/apps/9635/production/domains
  3. Go to: https://develop.fdpub.de/wp-admin/network/sites.php
  4. Add new site and note site ID for step 6.
  5. Make a backup of the origin single network site and download it. Follow this instructions
  6. Uncompress the backup.
    gzip -d backup.sql.gz
  7. Replace the origin table prefix in the SQL file with the target prefix from step 4.
    • Example for replace origin wp_8 with wp_2:
      sed -i 's/wp_8_/wp_2_/' backup.sql
  8. Replace the orign domain with the new:
    • Example for www.derwesten.de => derwesten.fdpub.de
      vip search-replace backup.sql --search-replace="https://www.derwesten.de,https://develop-derwesten.fdpub.de" --in-place
  9. Validate the SQL file: 
    • vip import validate-sql backup.sql
    • Only import if there are no errors! (all green)
  10. Compress the backup file.
    gzip backup.sql
  11. Import the backup to the fdpub network via CLI:
    • vip @fdpub.production import sql backup.sql.gz
    • If your SQL file is to big then you will receive an message:

      Error: The sql import file size (9223081955 bytes) exceeds the limit (5368709120 bytes). Note: This limit is lower for launched environments to maintain site stability.
      Please split it into multiple files or contact support for assistance.

      You need to split your backup file. (ask a senior dev for this)
  12. Update Network and purge cache.

Media import

Beware of the limitations! Read more

  1. Create and download a Media Backup from the origin (single) site: Follow this instructions
  2. Unpack the media backup, remove not needed content (e.g. wpallimport folder) – also rename the site-sub-folder to the new site id.
  3. Pack the media backup again and bring it to a public server.
  4. Upload the backup with VIP-CLI: https://docs.wpvip.com/vip-file-system/import-media-files/#h-import-media-files-with-vip-cli
    • vip @fdpub.production import media "https://www.zgtnet.de/fdpub/uploads.zip"