What do you need to know when you change hosting companies? How does a site move from host to host? What might be different that requires special handling?
- [Instructor] Changing hosts covers a lot of ground. There are many common issues between new hosts and old hosts, but the specifics vary widely. For the purpose of this course, I'm assuming that you're not trying to match your own server. If you are, there are other courses here on LinkedIn Learning that will help you with that. With every change of host, you'll have a large quantity of data to be moved. Site files, including core files, themes, and plugins, uploaded content, including images, videos, and documents, your database, including your WordPress-managed content, metadata, and user information. All of that content needs to move from your old environment to your new environment. While there are plugins that can expedite this experience for you, and we'll talk those elsewhere in the course, it's important for you to have a grasp of the fundamental changes that are happening, and to know how to handle the process when those tools aren't available to you. The simplest migration is like to like. That is, migrating from the same version of WordPress using the same type of server, and using the same software versions throughout the stack. One good reason for migrating your hosting, however, is because the new environment offers you some support benefit you didn't have before, and that could be because it's a different platform, with different packages installed. How do these differences matter? For WordPress itself, very little. As long as both hosts support the WordPress minimum requirements, WordPress will run just fine. But few WordPress websites are built on WordPress alone, and why would you move your site to a host that only supports the minimum requirements? My expectation is that you're moving to a host with equivalent or newer versions of all server software. Newer versions can still result in conflicts in plugins, themes, or in custom code, if that code isn't ready for a more modern environment. Code written for PHP 5.6 can also run in PHP 7.3; however, there is no guarantee that it will. The hosting company, WP Engine, provides a plugin, PHP Compatibility Checker, that scans your existing code base, all the code in your WordPress installation, and checks for PHP version compatibility. This tool is not a perfect check. It's scanning all code, which includes code for compatibility with other PHP versions. That code might not be executed when you're using 7.3. However, it is a way to get an indication of possible problems, and can tell you what parts of your site might cause you trouble. Your new host may use a different database manager. WordPress supports MySQL and MariaDB, but you can't just copy files directly to clone the database. Fortunately, MySQL and MariaDB are mostly compatible. MariaDB is a fork, software derived from the original source code of MySQL. You can usually import a MySQL export file into MariaDB. Moving from an Apache web server to NGINX is pretty painless. Moving to a Windows or Mac server is something I'd recommend avoiding. WordPress works well in either Apache or NGINX. If you're redirecting domains or protocols on Apache, you're probably using the .htaccess file for those rules. WordPress defines rules for each server it supports to handle normal URLs, but these custom rules will need to be migrated. You'll find helpful resources on adapting .htaccess files to NGINX configurations in the exercise files. Moving to a new host can be intimidating, but once you know the pitfalls to look for, the process of migrating to a new site can be made a lot easier.