The files you move depend on what your site actually is
When you switch hosting providers, you are not moving your entire account folder. You are moving the specific files that make your website work: your HTML pages, images, stylesheets, databases, and any code that runs on the server. Everything else — your email settings, your control panel configuration, your old backups — stays behind or gets recreated at the new host.
The exact list changes based on what kind of site you have. A simple HTML site needs different files than a WordPress blog, which needs different files than a custom web application. Knowing what to grab before you leave saves you from discovering mid-migration that you forgot something critical.
Key Takeaways
- Your website files live in a folder called public_html, www, or htdocs on your current host, and you access them through FTP or a file manager in your control panel.
- A static HTML site needs only HTML files, images, CSS stylesheets, and JavaScript files; a WordPress site also needs the database and the wp-config.php file that connects to it.
- Databases are not files you can see in a folder — you export them as a single .sql file through your hosting control panel or a database tool like phpMyAdmin.
- Custom code, plugins, themes, and configuration files are often the easiest things to forget and the hardest to recreate, so list them before you start moving anything.
- Your domain name registration and DNS records are separate from your hosting and do not move — you only change which host your DNS points to.
Where your website files actually live on your current host
Your hosting provider stores your website files in a specific folder on their server. The folder name varies by host — it might be called public_html, www, htdocs, or sometimes just your domain name. This is the only folder you need to move. Everything else on the server is configuration, email, or backup data that either stays behind or gets recreated.
You reach this folder through one of two methods. The first is FTP (File Transfer Protocol), which is a way to connect to your host's server and download files to your computer like you would from a cloud drive. The second is a file manager built into your hosting control panel — usually cPanel, Plesk, or something similar. Both methods show you the same folder. Use whichever one your new host supports, or use both if you want a backup copy on your computer.
Before you start downloading, open that folder and look at what is actually there. A WordPress site will have a wp-content folder, a wp-config.php file, and a wp-settings.php file. A static HTML site will have .html files and an images folder. A custom application might have folders named after the application itself. Write down what you see — this list is your checklist for the move.
Files you must move for a static HTML website
A static HTML site is the simplest to move because everything is a file you can see and touch. Download your entire public_html folder (or whatever it is called on your host). Inside it, you will find:
- HTML files — these are .html or .htm files that make up your actual pages
- Images folder — usually called images, img, assets, or media, containing .jpg, .png, .gif, or .webp files
- CSS files — .css files that control how your site looks, often in a folder called css or styles
- JavaScript files — .js files that add interactivity, often in a folder called js or scripts
- .htaccess file — a hidden file that controls redirects and server behavior; ask your host if you need this
That is usually everything. Upload this entire folder structure to your new host's public_html folder, and your site will work. The only exception is if you have custom redirects or special server rules in a .htaccess file — in that case, ask your current host for a copy before you leave.
Files and databases you must move for WordPress and similar platforms
WordPress sites need more than just files because they store content in a database. You need three things: the WordPress files themselves, the database, and the configuration file that connects them.
First, download the WordPress files. Connect via FTP or file manager and download your entire public_html folder. This includes the wp-content folder (which holds your themes and plugins), the wp-includes folder, and all the wp-*.php files. Do not skip this step even if you think you can reinstall WordPress fresh — your themes, plugins, and any custom code live in wp-content and will be lost if you do not grab it.
Second, export your database. This is where all your posts, pages, comments, and settings live. You cannot see it in a folder because it lives on a separate database server. To get it out, log into your hosting control panel and find phpMyAdmin (or a similar database tool). Select your WordPress database, click Export, and save the resulting .sql file to your computer. This single file contains everything WordPress needs to recreate your site. If you cannot find phpMyAdmin, ask your host how to export the database — they will walk you through it.
Third, note your wp-config.php settings. This file tells WordPress how to connect to its database. You do not need to move it — your new host will create a new one — but you do need to know your database name, database user, and database password. Open wp-config.php in a text editor and look for lines that say DB_NAME, DB_USER, and DB_PASSWORD. Write these down. When you set up WordPress on your new host, you will create a new database with a new name and password, so these old values will not work, but the structure tells you what information you need to gather.
Custom code, plugins, themes, and configuration files
If your site uses custom code, third-party plugins, or a custom theme, these live inside the wp-content folder (for WordPress) or in your site's root folder (for custom applications). The good news is that if you downloaded your entire public_html folder, you already have them. The bad news is that you need to know they exist, because if something breaks after the move, these are often the culprits.
Before you migrate, open your site's folder and look for any of these:
- A config.php, settings.php, or configuration.php file — this usually contains database connection details or API keys
- A plugins folder — if you use WordPress, this holds all your plugins
- A themes folder — if you use WordPress, this holds your theme files
- A vendor folder — if your site uses Composer or other dependency managers, this folder contains code libraries
- A .env file — this is a hidden file that often contains database passwords or API keys; ask your host if it exists
If any of these exist, make sure they are in your download. If you are moving to a new host and your site suddenly cannot connect to the database or an API stops working, one of these files was probably left behind or needs to be reconfigured for the new host.
What does not move: domain names, email, and DNS records
Your domain name registration is separate from your hosting. If you registered your domain through your current host, you can either transfer it to your new host or keep it where it is and just point it at the new host. Either way, the domain itself does not "move" — you change which server it points to.
Your email accounts also do not move automatically. If your current host provides email (like name@yoursite.com), those mailboxes live on the current host's mail server. You can either recreate them on your new host or set up forwarding to a different email address. Ask your new host whether they offer email hosting and what it costs.
DNS records are the instructions that tell the internet where your domain points. When you move hosts, you update your DNS records to point at your new host's servers instead of the old ones. This is usually a one-time change in your domain registrar's control panel, not something you download and move. Your new host will give you the DNS addresses to use.
The order to do this in
Moving hosting is not a single step — it is a sequence. Do it in this order to avoid losing anything:
- Download everything from your current host. Use FTP or the file manager to download your entire public_html folder. If you use WordPress or another database-backed platform, also export your database as a .sql file. Keep these files on your computer.
- Set up your account on the new host. Create your account, set up your database (if needed), and get your FTP login details. Do not upload anything yet.
- Upload your files to the new host. Use FTP or the new host's file manager to upload your public_html folder to the new host's server. If you have a database, import your .sql file into the new host's database.
- Test your site on the new host. Before you change your DNS, visit your site using the new host's temporary URL (usually something like yoursite.newhost.com) to make sure everything works.
- Update your DNS or transfer your domain. Once everything works, point your domain at the new host by updating DNS records or transferring the domain registration. This usually takes a few hours to take effect.
- Cancel your old hosting account. Once your site is fully working on the new host and DNS has updated, you can cancel your old account. Keep your downloaded files for at least a month in case you need to go back.
Frequently Asked Questions
Do I need to move my email if I switch hosting?
Not automatically. Email is separate from website hosting. If your current host provides email, you can recreate those accounts on your new host, forward them to a different email address, or keep them on the old host. Ask your new host what email options they offer before you cancel your old account.
What if I do not know what database my site uses?
Log into your hosting control panel and look for phpMyAdmin, MySQL, or a database section. You will see a list of databases associated with your account. If you use WordPress, the database name usually starts with your domain name or a prefix like wp_. If you are unsure, ask your current host — they can tell you the database name in one email.
Can I move my site while it is still live?
Yes, but you need to be careful. Download everything from your current host, upload it to the new host, test it thoroughly on the new host's temporary URL, and only then update your DNS. During the DNS update (which takes a few hours), some visitors might see the old site and some the new one, but your site stays online the whole time.
What is a .htaccess file and do I need it?
A .htaccess file controls redirects, password protection, and server behavior. It is hidden by default in most file managers. If your site has custom redirects or special rules, you need it. If you are not sure whether you have one, ask your current host or check your file manager's settings to show hidden files.
Do I need to move my SSL certificate?
No. SSL certificates are tied to your domain name, not your hosting account. Your new host can issue you a new free SSL certificate (most hosts do this automatically) or you can transfer your existing certificate if it is not free. Either way, you do not download and move it — your new host handles it.