06Web hosting & WordPress
Move a website or WordPress site to Nexthosting
Move a website or WordPress site to Nexthosting: transfer files and database, test via the preview address, switch DNS and take your email along.
In short
A move always works the same way: back up the old site, transfer files and database to Nexthosting, test the new site via the preview address, and only then switch the domain via DNS – the SSL certificate follows automatically. The old site stays online until everything works. If you do not want to do it yourself, our sister brand NextWebSolution handles the move for a fee.
The process at a glance
Section titled “The process at a glance”- Back up the old siteBack up files and database at the old provider
- Create the website at Nexthostingwith your domain, no DNS change yet
- Transfer files and databasewith a plugin or by hand
- Test via the preview addressthe old site stays online
- Everything fine?
- Switch DNSA/AAAA or nameservers
- minutes to 48 hrs
- SSL arrives automaticallyLet's Encrypt
- Cancel the old contractonly after a few days
Move it yourself or have it moved?
Section titled “Move it yourself or have it moved?”Preparation
Section titled “Preparation”- Take stock: Which domains, subdomains and email addresses exist? Which PHP version runs at the old provider? Are there cron jobs or special settings?
- Check your plan: Do the storage, number of websites, mailboxes and databases of your Nexthosting plan suffice (overview)?
- Take a complete backup at the old provider and save it on your computer.
- Lower the TTL: If you can, set the TTL of the A records at the old DNS provider to 300 seconds one to two days beforehand. The switch then takes effect faster later (DNS basics).
- Create the website at Nexthosting: in the web panel, create an empty website with your domain (Create a website) and set the same PHP version as at the old provider (PHP settings). With WordPress hosting, a website with WordPress already exists – the preinstalled site is overwritten during the move.
Way A: WordPress with a migration plugin
Section titled “Way A: WordPress with a migration plugin”Migration plugins pack files and database into an archive and restore it on the new site. Proven examples are “Duplicator”, “All-in-One WP Migration” or “Migrate Guru”. With free versions, watch out for size limits on the archive.
- Install the plugin on the old site and create a complete package or export. Download the file(s).
- On the new site at Nexthosting: with WordPress hosting, WordPress is already installed; with Webspace you install it with one click (Install WordPress). Log in via the preview address and install the same plugin.
- Import the package. Depending on the plugin, you upload it in the WordPress admin or via SFTP/FTP to the web folder and start the installer.
- Afterwards, log in with the login details of the old site – the database was taken over, after all.
- Save Einstellungen (Settings) → Permalinks once so that
.htaccessis rewritten.
If the upload aborts, raise the upload limit or upload the archive via SFTP.
Way B: Moving by hand
Section titled “Way B: Moving by hand”Works for WordPress and any other PHP software (Joomla, Contao, Shopware, custom sites).
At the old provider, download all files of the web folder (often htdocs, httpdocs, www or public_html) and upload them to public_html at Nexthosting – via SFTP or FTP. It is faster with a ZIP that you unpack in the file manager.
If you have SSH on both sides, rsync copies directly from server to server:
# run on the old serverrsync -avz --progress ~/htdocs/ USERNAME@SERVER:public_html/Do not forget hidden files such as .htaccess.
Export the database at the old provider (phpMyAdmin → Exportieren (Export), or mysqldump). At Nexthosting, create a new database with a user and import the file (Databases and phpMyAdmin).
# at Nexthosting via SSHmysql -h HOST -u USER -p DATABASE < ~/old-database.sqlEnter the new database details in the configuration file. With WordPress in public_html/wp-config.php:
define( 'DB_NAME', 'new_databasename' );define( 'DB_USER', 'new_databaseuser' );define( 'DB_PASSWORD', 'new_password' );define( 'DB_HOST', 'localhost' ); // value from the web panelAlso check $table_prefix – it must match the imported tables (e.g. wp_ or wp8x_).
If the domain has not changed, you do not need to replace any addresses in the database. If the site is moving to a new domain at the same time, replace the address with WP-CLI:
cd ~/public_htmlwp search-replace 'https://old-domain.com' 'https://new-domain.com' --all-tables --dry-runwp search-replace 'https://old-domain.com' 'https://new-domain.com' --all-tableswp cache flushTesting before the domain moves
Section titled “Testing before the domain moves”The old site is still online, and your domain still points to the old server. There are two ways to check the new site beforehand:
You tell only your computer that the domain already points to Nexthosting. All other visitors keep seeing the old site.
-
Read your website’s IP address in the web panel.
-
Open the hosts file with administrator rights:
- Windows:
C:\Windows\System32\drivers\etc\hosts(run the editor “as administrator”) - macOS/Linux:
sudo nano /etc/hosts
- Windows:
-
Add a line and save:
203.0.113.10 your-domain.com www.your-domain.comReplace
203.0.113.10with the IP from the web panel. -
Open your domain in the browser (private window). You now see the site at Nexthosting. The browser may warn about the certificate because SSL is only issued after the DNS switch – for testing you can ignore the warning.
-
Remove the line again after the test.
Every website has a preview address name-xxxx.staging.nexthosting.app. You can view static sites and many CMSs directly through it.
WordPress, however, redirects to the address stored in the database – that is, to your domain at the old provider. For testing, you therefore temporarily set this in wp-config.php:
define( 'WP_HOME', 'https://name-xxxx.staging.nexthosting.app' );define( 'WP_SITEURL', 'https://name-xxxx.staging.nexthosting.app' );Remove the two lines again before you switch DNS. Do not save anything in the editor during the test, or preview addresses end up in your content.
What you should test: home page and subpages, images, menus, contact form (does the mail arrive?), admin login, for shops the cart and checkout in test mode, special characters and umlauts, the PHP error log.
Switching DNS and SSL
Section titled “Switching DNS and SSL”When everything works, you switch the domain:
- Domain stays at the old provider: change the A record (and AAAA if applicable) for the domain and
wwwto the address from the web panel. - Nameservers to Nexthosting: first recreate all records you need in the web panel’s DNS editor (above all MX and TXT for email), then change the nameservers at the registrar to
ns1.nexthosting.netandns2.nexthosting.net. - Transfer the domain to Nexthosting: transfer with an auth code, see Registering and transferring a domain.
Step by step: Connecting a domain to a website.
As soon as the domain points to the server, the web panel automatically issues a Let’s Encrypt certificate, usually within a few minutes. Afterwards check: site reachable via https://, padlock in the browser, no warnings about mixed content.
Moving emails
Section titled “Moving emails”- At Nexthosting, create the same addresses as mailboxes (Email mailboxes).
- Switch the MX record to Nexthosting (automatic if you change nameservers, otherwise at the DNS provider). Adjust the SPF record there as well (
v=spf1 include:_spf.nexthosting.net ~all, see Email mailboxes). - In an email program (e.g. Thunderbird), set up the old and the new mailbox as IMAP accounts.
- Move the folders or emails from the old to the new account.
- Also check the old mailbox for a few days – until the DNS change has arrived everywhere, mail can still arrive there.
After the move
Section titled “After the move”- The site and forms work at
https://your-domain.com - A test mail from the contact form arrived
- Emails arrive in the new mailbox, sending works
- Cron jobs set up in the web panel (if the old site had any)
- Search engine visibility in WordPress is switched on (Einstellungen (Settings) → Lesen (Reading))
- Automatic backups are running (Backups)
- Only after a few days without problems: cancel the old contract, and download everything once more beforehand
Frequently asked questions
Section titled “Frequently asked questions”How long is my site offline during the move?
Section titled “How long is my site offline during the move?”With this process, practically not at all. The old site keeps running until the DNS switch takes effect. There are short differences only if content is changed during the transition.
After the move: “Fehler beim Aufbau einer Datenbankverbindung” (Error establishing a database connection).
Section titled “After the move: “Fehler beim Aufbau einer Datenbankverbindung” (Error establishing a database connection).”The login details in wp-config.php do not match the new database. See Fixing WordPress problems.
Subpages show 404 after the move.
Section titled “Subpages show 404 after the move.”The .htaccess file is missing. In WordPress, save Einstellungen → Permalinks once again.
Can I also move from another Nexthosting Webspace?
Section titled “Can I also move from another Nexthosting Webspace?”Within your web panel you can clone websites. Between different contracts, Support helps.