Troubleshooting cPanel Website Migration: Fixing Common Transfer & DNS Cutover Issues for Nepali .np/.com.np Operators
Migrating your website using cPanel is a common practice for many Nepali businesses, especially those operating with .np and .com.np domains. While cPanel simplifies the process, encountering issues during migration, backup, or DNS cutover can be frustrating. This guide is designed for Nepali website owners, SMBs, and e-commerce operators to troubleshoot and resolve common cPanel migration problems, ensuring a seamless transition to your new hosting environment.
Key facts: * cPanel is a popular web hosting control panel used by many Nepali hosting providers. * Website migration involves transferring files, databases, and configurations from one server to another. * DNS cutover is the critical step where your domain name starts pointing to the new server. * Proper backup is essential before initiating any migration.
Common cPanel Migration Problems and Solutions
When migrating a website, especially a WordPress migration, several hurdles can arise. Understanding these common issues and their solutions will save you time and potential downtime. From incomplete file transfers to database connection errors, we'll cover the most frequent challenges faced by Nepali website operators.
Incomplete File Transfer or Corrupted Files
Symptom: Your website appears broken, with missing images, broken links, or CSS errors after migration.
Cause: Incomplete FTP/SFTP upload, interrupted transfer, or issues with file permissions.
Solution:
1. Verify File Count and Size: Compare the number of files and their total size on the old and new servers. Use tools like rsync for a more robust transfer if possible, or re-upload critical directories.
2. Check File Permissions: Ensure that directories are set to 755 and files to 644. Incorrect permissions can prevent the web server from accessing your files.
3. Re-upload Key Directories: If specific sections of your site are broken, try re-uploading the wp-content folder (for WordPress) or other critical theme/plugin directories.
Database Connection Errors
Symptom: You see errors like "Error establishing a database connection" on your website, particularly common after a WordPress migration.
Cause: Incorrect database credentials in the configuration file (wp-config.php for WordPress), or the database itself wasn't fully migrated or is inaccessible.
Solution:
1. Verify Database Credentials: Double-check the database name, username, password, and hostname in your site's configuration file. These are often found in wp-config.php.
2. Confirm Database Import: Ensure your database was successfully imported into the new server's MySQL or MariaDB instance. Use phpMyAdmin or SSH to verify the database exists and contains tables.
3. Check Database Host: For most shared hosting, the database host is 'localhost'. If you're on a VPS or dedicated server, it might be a specific IP address or hostname.
Issues with WordPress Migration Plugins
Symptom: Migration plugins fail to complete the transfer, report errors, or the imported site doesn't function correctly.
Cause: Plugin conflicts, server resource limitations (memory limits, execution time), or incompatible PHP versions.
Solution:
1. Increase PHP Limits: Temporarily increase memory_limit and max_execution_time in your php.ini or .htaccess file. Hosting Nepal can assist with this for their clients.
2. Try a Different Plugin: If one plugin consistently fails, consider alternatives like Duplicator, All-in-One WP Migration, or Migrate Guru.
3. Manual Migration: If plugins continue to fail, a manual migration using cPanel's backup/restore feature or SSH might be necessary.
Problems with cPanel Backup and Restore
Symptom: Restoring a cPanel backup results in errors, missing data, or a non-functional website.
Cause: Corrupted backup file, incompatible cPanel versions between source and destination, or incomplete backup generation.
Solution: 1. Generate a Fresh Backup: Create a new full backup from the source cPanel account. Ensure the backup process completes without errors. 2. Verify Backup Integrity: Before restoring, check the size of the backup file. If it seems unusually small, the backup might be incomplete. 3. Manual Restoration: If the automated restore fails, manually restore files via FTP/SFTP and import the database using phpMyAdmin. You may need to adjust configuration files accordingly.
DNS Cutover Troubleshooting
DNS cutover is often the most nerve-wracking part of a website migration. It's the process where your domain name (e.g., yourbusiness.com.np or yourbusiness.com) begins to direct visitors to your new hosting server. Propagation can take time, but troubleshooting ensures it happens smoothly.
Slow DNS Propagation
Symptom: Your website is accessible on the new server when using its IP address, but not via the domain name, or it's intermittently accessible.
Cause: DNS changes take time to propagate across the global DNS network. This can be influenced by the TTL (Time To Live) setting of your DNS records.
Solution:
1. Check TTL Settings: Before the migration, ensure the TTL for your A record and CNAME records is set low (e.g., 300 seconds or 5 minutes). After migration, you can increase it.
2. Use Online DNS Checkers: Tools like dnschecker.org can show you the propagation status worldwide. This helps identify if the issue is widespread or localized.
3. Flush Local DNS Cache: Sometimes, your computer or local network might be caching old DNS information. Flushing your DNS cache can help.
Incorrect Nameservers
Symptom: Your domain is not pointing to the new server at all, or it's still pointing to the old one.
Cause: The nameservers at your domain registrar (where you purchased your .np or .com.np domain) have not been updated to point to your new hosting provider's nameservers.
Solution:
1. Identify New Nameservers: Obtain the correct nameservers from your new hosting provider (e.g., ns1.hostingnepal.com, ns2.hostingnepal.com).
2. Update at Registrar: Log in to your domain registrar account and update the nameserver records to the new ones provided. For .np domains, this might involve specific procedures with the Nepal Telecommunications Authority (NTA) or their designated registrars.
3. Allow Propagation Time: Remember that changing nameservers can take up to 48 hours to fully propagate globally.
DNS Records Not Migrated Correctly
Symptom: Email services stop working, subdomains are inaccessible, or other services tied to DNS records fail after migration.
Cause: Essential DNS records (MX for email, CNAMEs for subdomains, TXT for verification) were not copied or configured correctly on the new server's DNS zone.
Solution: 1. Replicate DNS Zone: Carefully compare the DNS zone file from your old cPanel account with the new one. Ensure all necessary records (A, CNAME, MX, TXT, SRV) are present and accurate. 2. Check MX Records: If email is affected, verify that your Mail Exchanger (MX) records are pointing to the correct mail server (often your hosting provider's mail servers or a third-party service like Google Workspace). 3. Consult Hosting Support: If you're unsure about specific DNS records, contact your hosting provider's support team for assistance.
How-To Steps for a Smoother Migration
To minimize troubleshooting, follow these steps during your cPanel migration. These steps focus on preparing, executing, and verifying the migration process.
Step-by-Step Migration Process
1. Full Backup of Existing Site: Before any changes, create a complete backup of your website files and database from your current cPanel account. Download this backup to your local computer.
2. Prepare New Hosting Environment: Ensure your new hosting account is set up. If migrating to Hosting Nepal, our team can assist with account provisioning.
3. Upload Website Files: Using cPanel's File Manager or an FTP client, upload your website's files to the public_html directory (or relevant subdirectory) on the new server.
4. Create New Database & User: In the new cPanel, create a new MySQL database, a database user, and assign the user to the database with all privileges. Note down the database name, username, and password.
5. Import Database: Import your downloaded database backup file into the newly created database using phpMyAdmin in the new cPanel.
6. Update Configuration File: Edit your website's configuration file (e.g., wp-config.php) on the new server to reflect the new database credentials (name, user, password, and host).
7. Test Website on New Server: Before updating DNS, test your website using a temporary URL or by modifying your local hosts file to point your domain to the new server's IP address. This allows you to catch errors without affecting live visitors.
8. Update DNS Records: Once you're confident the site works, update your domain's DNS records (A record and potentially MX records) at your domain registrar to point to the new server's IP address. For .np domains, this process might require specific steps with NTA-related entities.
9. Monitor DNS Propagation: Use DNS checker tools to monitor the propagation of your DNS changes globally.
10. Final Checks & Cleanup: After propagation is complete, perform final checks on your live website. Remove any old backup files and ensure everything is functioning as expected.
FAQ
Q1: How long does DNS propagation usually take after a cPanel migration?
A1: DNS propagation can take anywhere from a few minutes to 48 hours. The duration depends on the TTL (Time To Live) settings of your DNS records and how quickly DNS servers worldwide update their caches. Lower TTLs result in faster propagation.
Q2: Can I migrate my WordPress site using cPanel without a plugin?
A2: Yes, you can perform a manual WordPress migration using cPanel. This involves downloading your website files via File Manager or FTP, exporting your database via phpMyAdmin, uploading files to the new server, creating a new database, importing the database, and updating your wp-config.php file with new database credentials.
Q3: What should I do if my email stops working after migration?
A3: Check your MX (Mail Exchanger) records in your DNS settings on the new server. Ensure they are correctly pointing to your mail server. If you are using your hosting provider's email services, verify the MX records match their specifications. Also, check any firewall rules that might be blocking email traffic.
Q4: How do I update my .np domain's DNS settings?
A4: Updating .np domain DNS settings typically involves logging into the control panel provided by your domain registrar (often associated with the Nepal Telecommunications Authority - NTA). You will need to update the nameservers to those provided by your new hosting provider. For .com.np domains, the process is similar to .com domains.
Q5: What is the best way to ensure a complete backup before migration?
A5: Use cPanel's built-in backup feature to create a full website backup, including databases. Download this backup file to a secure local storage. For critical sites, consider using a reliable WordPress migration plugin that also creates a full backup as part of its process, or perform a manual backup via SSH if available.
Q6: My website looks broken after migration. What's the first step?
A6: The first step is to check your website's files and database. Verify that all files were uploaded correctly and that the database was imported successfully. Check file permissions (should be 644 for files, 755 for directories) and ensure your configuration file (like wp-config.php) has the correct database credentials. Browser cache issues can also cause display problems, so try clearing your cache.
Conclusion
Website migration, especially with cPanel, can present challenges, but most issues are resolvable with a systematic approach. By understanding common problems related to file transfers, database connections, and DNS cutover, Nepali .np/.com.np domain operators can troubleshoot effectively. Always prioritize a complete backup before starting, test thoroughly on the new server before updating DNS, and don't hesitate to consult your hosting provider's support. For seamless migrations and reliable hosting solutions in Nepal, consider Hosting Nepal's expert services tailored for the local market.
