WordPress

Below are the step-by-step instructions for manually uploading a WordPress website’s files and database to a new server.

1. Prepare the Files and Database

Before starting, ensure you have the following:

◉ WordPress Files: A complete backup of your WordPress files (e.g., downloaded via FTP or cPanel File Manager).
◉ Database Export: The SQL file exported from your current site’s database.

2. Upload WordPress Files to the New Server

◉ Access the New Server:
◉ Use an FTP client (e.g., FileZilla) for large files or the hosting File Manager.
◉ Log in with your FTP or hosting credentials.
◉ Upload WordPress Files:
◉ Navigate to the server’s web root directory, usually:
–public_html (for the main domain)
–A subfolder (for a subdomain or add-on domain).
◉ Upload all your WordPress files and folders (wp-content, wp-includes, wp-admin, etc.) to this directory.

3. Create a New Database

◉ Access the Database Manager:
◉ Log in to your hosting control panel and navigate to MySQL Databases or phpMyAdmin.
◉ Create a New Database:
◉ Create a new database (e.g., new_wpdb).
◉ Create a database user and set a strong password.
◉ Grant the user full privileges to the database.

Save the following information:
Database Name
Database Username
Password
Database Host

4. Import the WordPress Database

◉ Go to phpMyAdmin in your hosting panel.
◉ Select the newly created database.
◉ Click on the Import tab.
◉ Upload your exported .sql file and click Go.

This will populate the database with your WordPress content, users, and settings.

5. Update the wp-config.php File

◉ Now, you need to link your WordPress files to the new database.

◉ Locate the wp-config.php file in the root directory of your WordPress installation.
◉ Open it with a text editor or in File Manager.
◉ Update the following lines with your new database details:
define(‘DB_NAME’, ‘new_wpdb’); // Your new database name
define(‘DB_USER’, ‘new_db_user’); // Your new database user
define(‘DB_PASSWORD’, ‘new_password’); // Your new database password
define(‘DB_HOST’, ‘localhost’); // Usually ‘localhost’, check with your host if unsure

Save the file and re-upload it if necessary.

6. Update URLs (If Domain or Path Has Changed)

◉ If the site is being moved to a different domain or folder, you need to update the URLs:

◉ Go to phpMyAdmin and select your database.
◉ Open the wp_options table.
◉ Update the following rows:
siteurl: Set it to your new domain (e.g., https://example.com).
home: Set it to your new domain.
◉ If needed, update all URLs in the database:
◉ Use a search-and-replace tool like Better Search Replace (plugin) or a SQL query.

7. Update File Permissions

Ensure proper permissions for the WordPress directories:

Folders: 755
Files: 644

8. Test the Website

◉ Open your new domain in a web browser.
◉ Verify that:
The website loads correctly.
Links, images, and media work.
Admin panel access (/wp-admin) works.
◉ If you encounter errors:
Double-check the wp-config.php database credentials.
Verify the database import.

9. Optional: Update Permalinks

To fix broken links or permalinks:

Log in to your WordPress dashboard.
Go to Settings > Permalinks.
Simply click Save Changes to regenerate the .htaccess file.

10. Point the Domain (DNS)

If the domain was moved to a new server:

Update the DNS records with your domain registrar.
Point to the new server’s IP address or nameservers.
Allow up to 24-48 hours for the DNS changes to propagate.