How to migrate to a WordPress website — No downtime!

How to migrate to a WordPress website — No downtime!

I have recently had to migrate a new WordPress website from a previous CMS, and it only took me 5 minutes, with less than a minute at most of downtime.

Both the speed of implementation, and the downtime, are based on how fast your files are moved from an ambiguous subdirectory. I would use FTP like Filezilla as a last resort, if your host does not have a web interface for managing files (File Manager).

I’ve outlined the steps below so that you could re-use this guide:
I use the plugin ‘All in One WP Migration’ since it’s a one-click solution. And it’s free for websites up to 512MB. Please make sure to delete node_modules before exporting, lol.

Step summary

Prepare new WordPress site on production site (take your time)

  • On Staging site, export the website using the plugin ‘All in One WP Migration’.
  • Log-in to the File Manager of Production site, e.g. through cPanel, FTP.
  • Install WordPress in an ambiguous subdirectory e.g. /public_html/w
  • Log-in to WordPress on subdirectory example.com/w/, and install the plugin ‘All in One WP Migration’, and import your .wpress file onto subdirectory /w/ of production site.
  • After import is complete, save Permalinks, as instructed by the migration plugin
  • Setup the WordPress website as you wish e.g. setup HTTPS, run any checks, etc.

Switching to WordPress site now (take your time)

  • In your WordPress install, change both the WordPress URL and Site URL, by removing the subdirectory e.g. remove /w from both URLs, click Save.
  • Your WordPress install should now be broken *wink*
  • Enable your WordPress’s .htaccess file for maintenance mode, using the code snippet here [link to setting up maintenance.html]

Removing old production site’s files (do this quickly please)

  • Move all unneeded files from public_html into another ambiguous folder, e.g. public_html/x
  • Move all contents of WordPress install /w/ up ↖️ into public_html.
    *This will present your .htaccess file’s maintenance mode now. Nice!
  • Log-in to WordPress install using new URL — this time without the /w subdirectory!
    Yes! The site should now be working on WordPress.
  • Disable/Comment out the .htaccess file’s Maintenance Mode
  • Completed in 5 minutes. Now do a website healthcheck e.g. setup Search Console, Google Analytics

Migration complete! This is where developers lose calories, but are in a high-stress situation.

I’ll share my experience where I have learned the lesson to:

Always ask for cPanel access (and make a backup), never migrate a website without these.

Any additions/suggestions to this, please let me know in the comments below.


If you’ve enjoyed this post you’ll ❤️ to search around my website for more like these. See you then!

,