NetPoa

Move a website and its database to your hosting (WordPress or PHP)

Updated 27 Nov 2026

This guide moves a website by hand: useful when the old host has no cPanel, or you are copying a site from your computer. Moving from another cPanel host? A full cPanel backup is easier: open a ticket and we can move it for you.

What you need from the old site

  1. The files: everything in the website's folder, as a ZIP. For WordPress: the folder with wp-config.php, wp-content and wp-admin.
  2. The database: in the old host's phpMyAdmin, choose the database, open Export, keep Quick and SQL, and press Export. You get a .sql file.

1. Upload the files

  1. Open cPanel (Services › your hosting › Login to cPanel) › File Manager › public_html (or the folder of an addon domain).
  2. Upload the ZIP, then right-click it and Extract.
  3. Make sure the site's files (for example index.php) sit directly in public_html, not in a folder inside it. Move them up if needed.

More: Upload your website.

2. Create the new database

In MySQL® Databases: create a database, create a user with a strong password, and add the user to the database with ALL PRIVILEGES. Names start with your cPanel username, for example dukabora_wp. Step by step: Create a MySQL database.

3. Import the database

  1. Open phpMyAdmin, click the new database on the left.
  2. Open Import, choose your .sql file, press Import (or Go).

A very large file that phpMyAdmin will not take: upload it to your home folder with File Manager, then in cPanel Terminal run:

mysql -u dukabora_wp -p dukabora_wp < ~/backup.sql

4. Connect the site to the new database

WordPress: edit wp-config.php in File Manager:

define( 'DB_NAME', 'dukabora_wp' );
define( 'DB_USER', 'dukabora_wp' );
define( 'DB_PASSWORD', 'the-new-password' );
define( 'DB_HOST', 'localhost' );

Keep the $table_prefix line as it was on the old site.

Other PHP sites: change the same four values in the site's config file (often config.php or .env).

5. Point the domain

Point the domain to your hosting (the nameservers on your hosting page): see Point your domain to your hosting. Then turn on free SSL.

6. Changing the address? (WordPress)

If the site moves to a new domain (or from http:// to https://), WordPress keeps the old address in its database:

  1. Sign in to /wp-admin (if it sends you to the old address, change siteurl and home in phpMyAdmin, table wp_options).
  2. Install a search-and-replace plugin such as Better Search Replace, replace the old address with the new one in all tables, run it once as a dry run first, then for real.
  3. Open Settings › Permalinks and press Save Changes.

Check

  • Pages, images and the admin open on the new hosting.
  • Forms and emails work.
  • No "Error establishing a database connection": if there is, see this fix.

Kwa Kiswahili

Kuhamisha website: chukua mafaili (ZIP) na database (phpMyAdmin › Export). Kwenye hosting mpya: pakia na Extract kwenye public_html, tengeneza database na mtumiaji (ALL PRIVILEGES), Import faili la .sql kwenye phpMyAdmin, kisha badilisha jina la database, mtumiaji na password kwenye wp-config.php.


Still need help? Open a ticket and we will reply.

Was this helpful?