A provider switch with your own website can offer numerous benefits, such as lower costs, better performance, or enhanced features. However, website migration is a technical challenge that requires careful planning and precise execution to avoid downtime and data loss. It becomes particularly complex with database-driven websites or extensive projects with unique requirements.
This article shows step by step how to successfully migrate a website and what aspects should be considered. Finally, there is an overview of web hosting providers with website migration services if you prefer not to handle the migration of your website yourself.
Preparing for the Website Migration
A thorough analysis of the website, selecting a compatible hosting provider, and creating a complete backup are essential steps to plan a smooth website migration and avoid data loss.
Analysis of the Current Website
A thorough analysis of the existing website is the first step in planning the migration. Initially, the website type should be determined. Static websites, consisting of simple HTML, CSS, and Javascript files, are easier to migrate, while CMS-based (e.g. WordPress, Joomla) or e-commerce sites (e.g. Magento, WooCommerce) come with additional requirements.
Storage requirements and technical specifications should be documented: How much storage space does the website require on the server? Which scripting languages and database types are being used (e.g. PHP and MySQL)? This information helps define the requirements for the new hosting offer.
Especially for database-driven websites, the database size and structure are crucial. Tools like phpMyAdmin can be used to export the current database and analyse the size and table structure. This data influences the selection of the new provider and serves as the basis for a smooth data migration.
Selection of the New Provider
Choosing the right hosting provider is crucial for the long-term performance and security of the website. It is advisable to compare different hosting offers, especially in terms of price, performance, and additional features such as automated backups or scalable resources.
- Checking compatibility is essential: The PHP version, the type of databases (e.g. MySQL, MariaDB), and the available storage space of the new provider must meet the website's requirements. A mistake in these technical details can lead to significant issues, such as a non-functioning website after the migration.
- The contractual terms also play a role: What is the minimum contract term? Are there money-back guarantees or flexible cancellation periods included? A look at the support scope – such as 24/7 availability or dedicated contacts – can also influence the decision, especially for websites with critical functions.
Creating Backups
Before the actual migration, a complete backup of the existing website is essential. This is the only way to avoid data losses and to be able to rely on a secure copy at any time in case of issues during the migration.
There are various tools and methods to create backups. Files can be backed up using FTP clients like FileZilla, while hosting panels (e.g. cPanel or Plesk) often provide an easy way to create full backups. For CMS-based websites, there are specialised plugins like UpdraftPlus (for WordPress) that allow for automatic backup of files and databases.
After creating the backup, it is important to verify its completeness. This includes testing the backup on a local server or a testing environment to ensure that all files and databases were exported correctly. An incomplete backup can lead to lost content in case of an emergency and jeopardise the entire migration.
Domain Transfer
When switching providers, the domain usually needs to be migrated as well. For this, an Auth-Code is required, a type of security code provided by the current registrar. This code ensures that only the domain owner can transfer the domain. It is important to request this code from the old provider in a timely manner, as processing may take some time.
In addition, the DNS settings of the current domain should be documented, especially A, MX, and CNAME records. This information is essential for correctly configuring the domain with the new provider later on and ensuring the functionality of services like email.
After a successful transfer, the domain needs to be set up with the new provider. This includes updating the DNS records so that the domain points to the new server. This is often done through the control panel of the new provider, where the previously documented settings are entered.
Info: An important aspect is the timeframe for DNS propagation. Changes to DNS records can take up to 48 hours to take effect globally. During this time, the website may experience temporary inaccessibility. Therefore, it is advisable to carry out the migration outside of peak times or on weekends.
Data Transfer
The actual migration of the website begins with transferring the files and databases from the old to the new hosting provider.
- Downloading website files via FTP/SFTP: Using an FTP client such as FileZilla or WinSCP, all website files (e.g. HTML, CSS, JavaScript, media) can be backed up from the current server to the local computer. Ensure that hidden files like .htaccess are also included.
- Exporting the database using tools like phpMyAdmin: Databases commonly used in CMS-based websites can be exported using management tools like phpMyAdmin. Select the "Export" option to generate a .sql file containing all database contents, including tables and records.
- Uploading files to the new server: After backing up, upload the files to the new server, also using an FTP client. It is important to maintain the directory structure to avoid errors.
- Importing the database: The exported database can be imported to the new server using tools like phpMyAdmin or a similar management tool. Ensure that the database is correctly created and uses the same table prefixes.
Procedure for CMS-based websites (e.g. WordPress, Joomla)
For CMS-based websites like WordPress or Joomla, migration is more complex as specific configuration files need to be adjusted.
- Specific tools and plugins for migration: Many CMS platforms offer special plugins or tools to facilitate migration. For WordPress, plugins like Duplicator or All-in-One WP Migration are useful as they can automate the backup and restoration of both files and the database on the new server.
- Changes in wp-config.php and similar files: In the WordPress configuration file wp-config.php, the access details to the new database need to be adjusted, including the database name, username, and password. For Joomla, this is done in configuration.php. These changes are necessary to establish the connection between the website and the new database.
Ensuring Compatibility
After the transfer, the website on the new server must be tested to ensure that all functions are working as intended.
- Checking PHP version, MySQL/MariaDB, and other technical requirements: The new server must be compatible with the required PHP version and necessary database types. This information can be viewed in the hosting panel of the provider and adjusted if needed. Inconsistencies, such as using an outdated PHP version, can cause the website to not function properly.
During this phase, potential errors such as unloaded plugins, faulty database connections, or missing files should be identified and resolved before the website goes live.
Functionality check
After successfully transferring the website to the new hosting server, a comprehensive check of functionality should be carried out. This step is crucial to ensure that the website is running smoothly and all components are functioning correctly.
Checking Links
A faulty linking system can significantly impact the user-friendliness of the website and have negative effects on SEO ranking.
- Internal Links: Verify that internal references between pages are functioning correctly. Paths can often change during migration and need to be adjusted.
- External Links: Ensure that external links still lead to the correct destination pages.
- Automated Tools: Tools like Screaming Frog or Broken Link Checker can be used to efficiently identify faulty links.
Testing Forms
Forms are essential for interacting with visitors, whether for contact inquiries, newsletter subscriptions, or orders.
- Data Submission: Test whether forms correctly submit and store the entered data. This can be verified by submitting test forms.
- Email Notifications: If forms send email notifications, it must be checked that the email function is set up correctly on the new server (e.g. SMTP settings).
- Data Privacy: Ensure that data privacy regulations are complied with, especially regarding the storage and transmission of user data.
Testing Plugins and Extensions
For CMS-based websites like WordPress or Joomla, plugins and extensions are essential for functionality. These need to be carefully tested to ensure they are working correctly.
- Compatibility: Check if the installed plugins are compatible with the PHP version and other server settings of the new provider. Incompatible plugins can cause malfunctions or crashes.
- Settings: Ensure that the plugin settings are preserved and applied correctly after the migration.
- Updates: Update plugins to the latest version to avoid errors and close security vulnerabilities.
Final Testing
After checking all relevant areas, the website should be thoroughly tested in a test environment or with a temporary URL. Only when all links, forms, and plugins function flawlessly should the website be launched live to ensure a smooth user experience.
A well-planned and carefully executed website migration minimises downtime and ensures that your own homepage is quickly fully functional again. By following structured steps and conducting thorough tests, typical errors that may occur during a provider switch can be avoided. For particularly complex projects, such as large e-commerce platforms or custom-programmed websites, using a website migration service may be beneficial to make the process efficient and error-free.
Looking for new web hosting but don't have the time or technical know-how for your website migration? Find suitable web hosting offers here with a free website migration service that makes the transition easy and stress-free for you!