Cara Migrate WordPress ke Hosting Baru 2025
WordPress Migration Complete Guide
Moving WordPress to new hosting? Follow this step-by-step guide for smooth migration!
Why Migrate?
Common Reasons
- Better performance needed
- Cheaper hosting found
- More features required
- Better support wanted
- Server location change
- Hosting company issues
Pre-Migration Checklist
Preparation Steps
- Full backup of current site
- Export database
- Test backup restore
- Check DNS TTL (lower to 300)
- Document current setup
- Inform users if needed
- Choose maintenance window
What You Need
- New hosting credentials
- FTP software (FileZilla)
- SSH access (optional but helpful)
- Database credentials (old and new)
- Domain registrar access
- 2-4 hours time
Method 1: Plugin Migration (Easiest)
Using Duplicator Plugin
Step 1: On Old Site
- Install Duplicator plugin
- Packages → Create New
- Name: sitename-migration-date
- Next → Scan → Build
- Download both installer.php and archive.zip
Step 2: On New Hosting
- Create empty database
- Note database name, username, password
- Upload installer.php and archive.zip to public_html
- Visit yoursite.com/installer.php
- Follow wizard
- Enter new database credentials
- Update URLs
- Test site
- Delete installer files
Advantages:
- Beginner friendly
- Automatic URL updates
- Database and files together
- Less technical knowledge needed
Limitations:
- Large sites may timeout
- Some hosts block installer.php
- Free version has size limits
Using All-in-One WP Migration
Even Simpler:
- Install plugin on old site
- Export site to file
- Install plugin on new site
- Import file
- Done!
Limit: 512MB on free version
Method 2: Manual Migration (Full Control)
Step 1: Backup Files
Via FTP:
- Connect FileZilla to old site
- Download entire WordPress folder
- Keep folder structure intact
- Takes 15 minutes - 2 hours (size dependent)
Via cPanel:
- File Manager → Select public_html
- Compress → Download
- Faster than FTP for large sites
Step 2: Export Database
phpMyAdmin Method:
- cPanel → phpMyAdmin
- Select WordPress database
- Export tab
- Quick → SQL format
- Go → Download .sql file
Step 3: Setup New Hosting
Create Database:
- New host cPanel → MySQL Databases
- Create database (name it same or note new name)
- Create user with strong password
- Add user to database
- Grant ALL PRIVILEGES
- Note: database name, username, password, host
Step 4: Upload Files
Via FTP:
- Connect to new host
- Upload all WordPress files to public_html
- Keep folder structure identical
- Can take 30 minutes - 3 hours
Via cPanel:
Upload zip, extract in File Manager (faster!)
Step 5: Import Database
phpMyAdmin on New Host:
- Select your new database
- Import tab
- Choose SQL file
- Go
- Wait for import (1-10 minutes)
If file too large:
- Use BigDump script
- Or increase upload limits
- Or command line import
Step 6: Update wp-config.php
Edit wp-config.php with new credentials:
define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_username');
define('DB_PASSWORD', 'new_password');
define('DB_HOST', 'localhost'); // or new host value
Step 7: Update URLs
If Domain Stays Same:
Site should work immediately!
If Domain Changes:
Option A: Plugin
- Install Better Search Replace
- Search: old-domain.com
- Replace: new-domain.com
- Select all tables
- Run!
Option B: Manual SQL
In phpMyAdmin:
UPDATE wp_options SET option_value = replace(option_value, 'http://old-site.com', 'http://new-site.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://old-site.com', 'http://new-site.com');
UPDATE wp_posts SET guid = replace(guid, 'http://old-site.com', 'http://new-site.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://old-site.com', 'http://new-site.com');
Step 8: Update DNS
Point Domain to New Server:
- Get new server IP from hosting
- Go to domain registrar
- Update A record to new IP
- Wait 1-48 hours for propagation (usually 2-6 hours)
Check Propagation:
Use whatsmydns.net to check DNS propagation globally
Testing Migration
Comprehensive Tests
Before DNS Change:
Edit hosts file to test new site:
- Windows: C:\Windows\System32\drivers\etc\hosts
- Mac/Linux: /etc/hosts
Add line: new-server-ip yourdomain.com
After Migration:
- Homepage loads correctly
- Admin panel accessible
- All posts display properly
- Images showing
- Forms work
- Login/logout works
- Comments functional (if enabled)
- Search works
- Permalinks correct
- SSL certificate (if applicable)
- Contact forms send emails
Troubleshooting Common Issues
Database Connection Error
- Verify wp-config.php credentials
- Check DB_HOST value (might not be localhost)
- Ensure database user has privileges
Images Not Displaying
- Check file permissions
- Verify wp-content/uploads copied
- Update URLs if domain changed
- Check .htaccess rules
404 Errors on Posts
- Settings → Permalinks → Save
- Check .htaccess exists and writable
- Verify mod_rewrite enabled on new server
Site Very Slow
- Clear cache plugins
- Check PHP version
- Optimize database
- Verify server resources
Admin Panel Not Loading
- Check wp-admin URL
- Clear browser cache
- Check file permissions
- Verify all files uploaded
Post-Migration Checklist
Must Do
- Test all functionality
- Update email settings
- Setup SSL certificate
- Configure caching
- Update CDN (if using)
- Test contact forms
- Check analytics tracking
- Verify search console
- Update payment gateways
- Notify users if needed
Monitor for 48 Hours
- Site uptime
- Error logs
- User reports
- Performance metrics
- Email delivery
Zero Downtime Migration
Advanced Method
- Clone site to new host
- Test thoroughly
- Put old site in maintenance mode
- Quick final database sync
- Change DNS
- Remove maintenance mode
Downtime: 5-15 minutes only!
Best Practices
Do’s
- Always backup first
- Test on new host before DNS change
- Keep old site active until confirmed
- Document every step
- Use checklist
- Schedule during low traffic
Don’ts
- Rush the process
- Skip testing
- Delete old site immediately
- Change many things at once
- Ignore error logs
- Forget SSL setup
When to Hire Expert
Consider professional help if:
- Very large database (1GB+)
- Custom code/integrations
- E-commerce site
- Mission critical site
- No technical experience
- No time for learning
- Previous attempt failed
Cost: $50-$500 depending on complexity
Conclusion
WordPress migration is straightforward with proper planning:
- Full backup
- Export database
- Upload files to new host
- Import database
- Update wp-config.php
- Update URLs (if needed)
- Change DNS
- Test everything
Takes 2-4 hours for typical site. Use plugin for simplicity or manual method for full control. Always test before changing DNS!
Your site will run on new hosting smoothly if you follow this guide systematically.
Link Postingan : https://www.tirinfo.com/cara-migrate-wordpress-ke-hosting-baru-2025/