Skip to content
Puranode

Guide

Move a WordPress Site to a New Host, Step by Step

To move a WordPress site to a new host, copy all of its files and export its database, import both on the new host, and update wp-config.php with the new database details. WordPress's own documentation notes that if the domain stays the same, that is the whole move. Test the site on the new host before changing DNS, and keep the old host running until visitors have switched over.

Published

On this page

FAQ

Frequently asked

Can I move WordPress without a plugin?

Yes. Copy all the files, export the database with phpMyAdmin or mysqldump, import both on the new host and update the database settings in wp-config.php. WordPress's own guide says that when the domain stays the same, copying files and database is enough.

Why does my moved site keep redirecting to the old domain?

WordPress stores its address in the database, so a copy on a temporary address redirects to the stored one. For testing, set WP_HOME and WP_SITEURL in wp-config.php to the temporary address, and remove them when DNS points at the new host.

Why do I get Error establishing a database connection after moving?

One of DB_NAME, DB_USER, DB_PASSWORD or DB_HOST in wp-config.php is wrong for the new host. DB_HOST is the usual culprit: many hosts use a separate database server, so it is a hostname and possibly a port, not localhost.

Why do all my posts return 404 after the move?

The permalink rewrite rule is missing. On nginx, .htaccess is ignored, so the server needs try_files $uri $uri/ /index.php?$args. On Apache, resave the permalink structure under Settings, Permalinks.

Will moving hosts cause downtime?

Not if you keep the old site running until DNS has switched. Lower the TTL a day ahead, test on the new host first, then change DNS. Visitors reach one working copy or the other while caches expire.

How much does website hosting cost at Puranode?

Starter is €4.99 every 30 days, VAT included: 1 GB RAM, 1 vCPU, 15 GB NVMe, one website and one MySQL database, with one-click WordPress, free SSL and a free subdomain. No setup fee, no minimum term.

Projects referenced

This guide names other people’s work. These are their own pages, so you get the current documentation rather than our summary of it.

Moving a WordPress site?

Starter gives WordPress its own nginx and PHP container with 1 GB RAM, a MySQL database, free SSL and a free subdomain to test on, for €4.99 every 30 days, VAT included.