Troubleshooting Common WordPress Migration Issues: A cPanel & DNS Cutover Guide for Nepali SMBs
Migrating your WordPress website to a new host can be a daunting task, especially for small business owners in Kathmandu. Common issues like white screens, database connection errors, and incorrect site URLs can arise during the cPanel transfer and DNS cutover process. This guide will walk you through troubleshooting these problems, ensuring your Nepali business website, whether it's a .np or .com.np domain, experiences a smooth transition with minimal downtime.
Key facts: * WordPress powers over 43% of all websites globally, making smooth migrations crucial. * Improper DNS configuration is a leading cause of post-migration website downtime. * Always create a full backup before initiating any migration process. * Hosting Nepal offers dedicated support for cPanel migrations.
Understanding the Migration Process for Nepali Websites
Website migration involves moving your website files and database from one hosting server to another. For many Nepali SMBs, this often means transferring from an old host to a new, more reliable provider like Hosting Nepal. The primary tools involved are usually cPanel for file and database management and your domain registrar for DNS updates. A successful migration requires careful planning and execution, particularly when dealing with local payment gateways like Khalti or eSewa, which need consistent URL access.
The Role of cPanel in WordPress Migration
cPanel is a popular web hosting control panel that simplifies website management. When migrating a WordPress site, cPanel allows you to easily:
1. Backup your entire website: This includes all files (WordPress core, themes, plugins, uploads) and your MySQL database.
2. Compress files: You can create a .zip archive of your public_html directory.
3. Export databases: Using phpMyAdmin within cPanel, you can export your WordPress database.
4. Transfer files: You can download the backup to your local machine or directly transfer it via FTP/SFTP to the new host.
Many hosts, including Hosting Nepal, offer free cPanel migration services, taking the technical burden off your shoulders. However, understanding the process helps in troubleshooting.
DNS Cutover: Pointing Your Domain to the New Host
After your website files and database are on the new server, the final step is to update your Domain Name System (DNS) records. This tells internet browsers where to find your website. For .np domains registered with NTA, or .com.np domains, you'll typically update the nameservers at your domain registrar to point to your new hosting provider's nameservers. This process, known as DNS propagation, can take anywhere from a few minutes to 48 hours to fully update across the internet. During this period, some users might see the old site, while others see the new one.
Common WordPress Migration Issues and How to Fix Them
Migrating a WordPress site can throw up several challenges. Here's how to tackle the most frequent ones faced by Nepali SMBs.
1. White Screen of Death (WSOD)
Problem: Your website shows a blank white page after migration, with no error messages.
Cause: Often caused by PHP memory limits, conflicting plugins/themes, or corrupted files.
Troubleshooting Steps:
Increase PHP Memory Limit: Access your wp-config.php file (located in your WordPress root directory) and add define('WP_MEMORY_LIMIT', '256M'); above the / That's all, stop editing! Happy blogging. */ line. If you're on a Hosting Nepal plan, you can also adjust this via cPanel's MultiPHP INI Editor.
* Deactivate Plugins: Rename your wp-content/plugins folder (e.g., to plugins_old) via cPanel's File Manager or FTP. This deactivates all plugins. If the site comes back, reactivate plugins one by one to find the culprit. Then, delete and reinstall the problematic plugin.
* Switch to Default Theme: Rename your current theme folder in wp-content/themes (e.g., mytheme_old). WordPress will automatically revert to a default theme like Twenty Twenty-Four. If the site works, your theme is the issue. Reinstall or update it.
* Enable Debugging: Add define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true); to wp-config.php. This will display errors on the screen or log them to a debug.log file in wp-content, providing clues.
2. Database Connection Errors
Problem: You see "Error establishing a database connection" on your site.
Cause: Incorrect database credentials in wp-config.php, a corrupted database, or the database server being down.
Troubleshooting Steps:
* Verify wp-config.php: Open wp-config.php and check DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST. These must exactly match the database credentials created on your new host via cPanel's MySQL Databases section. DB_HOST is usually localhost, but some hosts might use a different address.
* Check Database User Privileges: Ensure the database user has all privileges assigned to the database in cPanel.
* Repair Database: In cPanel's phpMyAdmin, select your WordPress database and click the "Check All" option at the bottom, then choose "Repair table" from the dropdown.
* Import Database Again: If the above fails, try re-exporting and re-importing your database. Ensure the character set (e.g., UTF-8) is consistent.
3. Incorrect Site URL or Redirect Loops
Problem: Your website redirects to the old domain, shows a "Too many redirects" error, or links are broken.
Cause: WordPress stores the site URL in its database. If not updated correctly, it points to the old location.
Troubleshooting Steps:
Update wp-config.php (Temporary Fix): Add these lines to wp-config.php above the / That's all, stop editing! Happy blogging. */ line, replacing yourdomain.com with your actual domain:
``php
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');
`
Remember to remove these lines after successfully updating via the database or WordPress admin.
* Update via phpMyAdmin: Access your database via cPanel's phpMyAdmin. Go to the wp_options table (the prefix wp_ might be different). Find siteurl and home options and update their option_value to your new domain (e.g., https://yourdomain.com).
* Use a Search and Replace Plugin: Once you can access your WordPress admin, install a plugin like "Better Search Replace" to update all instances of your old domain to the new one within the database. This is crucial for internal links, images, and other serialized data.
4. Broken Permalinks and 404 Errors
Problem: Pages other than the homepage return 404 errors.
Cause: The .htaccess file, which handles permalinks, might be missing or corrupted during migration, or server rewrite rules aren't configured.
Troubleshooting Steps:
* Resave Permalinks: Go to your WordPress Admin > Settings > Permalinks. Without making any changes, simply click "Save Changes." This will regenerate your .htaccess file.
* Manually Recreate .htaccess: If resaving doesn't work, delete the .htaccess file from your WordPress root directory via cPanel File Manager (make a backup first!). Then, resave permalinks again. If that fails, manually create a new .htaccess file in the root with the following content:
`apache
# BEGIN WordPress
`
5. DNS Cutover Issues: Still Seeing the Old Site
Problem: After updating nameservers, you still see your old website or experience inconsistent access.
Cause: DNS propagation delays, local DNS caching, or incorrect nameserver entries.
Troubleshooting Steps:
* Verify Nameservers: Double-check that the nameservers entered at your domain registrar (e.g., NTA for .np domains) are exactly what your new host (like Hosting Nepal) provided. A single typo can cause issues.
* Check DNS Propagation: Use online tools like whatsmydns.net to see if your DNS records have propagated globally. Remember, propagation can take up to 48 hours. According to Nepal Telecommunications Authority (NTA) guidelines, DNS updates should typically resolve within 24 hours for most ISPs in Nepal, but local caching can extend this.
* Clear Local DNS Cache: On your computer, clear your DNS cache. For Windows, open Command Prompt and type ipconfig /flushdns. For macOS, open Terminal and type sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder`.
* Try a Different Network/Device: Access your site from a different internet connection (e.g., mobile data instead of your WorldLink/Vianet/Classic Tech/Subisu home Wi-Fi) or a different device to rule out local caching issues.
Best Practices for a Smooth WordPress Migration
To minimize troubleshooting, follow these best practices:
* Full Backup: Always create a complete backup of your website (files and database) before starting. Store it safely on your local machine. Hosting Nepal recommends using cPanel's Backup Wizard. * Staging Environment: If possible, migrate to a staging environment first. This allows you to test everything thoroughly before going live. Update WordPress, Themes, and Plugins: Ensure everything is up-to-date before* migration to avoid compatibility issues on the new server. * Clear Caching: Deactivate any caching plugins (e.g., LiteSpeed Cache, WP Super Cache) before migration and reactivate/reconfigure them after the move. SSL Certificate: If your site uses HTTPS, ensure an SSL certificate is installed and active on the new host before* changing DNS. Hosting Nepal provides free Let's Encrypt SSL certificates. * Professional Help: Don't hesitate to contact your hosting provider's support team. Hosting Nepal's expert support is available 24/7 to assist with cPanel transfers and WordPress migration challenges.
By understanding these common WordPress migration issues and their solutions, Kathmandu SMBs can navigate the process with confidence. Remember, a thorough backup and careful DNS cutover are your best friends for a successful website transfer. If you encounter persistent problems, don't hesitate to leverage the expertise of your hosting provider. Hosting Nepal is always ready to assist you in making your website migration seamless and stress-free.
