How to Move a WordPress Site from Localhost to Live
Updated 2026-07-04 · Hosting Reviews
Moving a WordPress site from localhost to live is a common step for developers and hobbyists who want to share their work with the world. This guide walks you through the exact steps you need—what you’ll need, how to pick the right hosting, and a simple migration workflow that saves you time and money. If you’re new to hosting, we’ll show why Hostinger’s affordable plans, free SSL, and one‑click WordPress install make it a solid choice.
What You’ll Need Before You Start
Before you hit deploy, gather these essentials:
- Local WordPress site – Built on XAMPP, MAMP, or another local stack.
- Domain name – A unique URL you own or plan to register.
- Hosting account – A plan that supports WordPress (shared, cloud, or VPS).
- Database export – A SQL dump of your local database.
- FTP/SFTP client – FileZilla, Cyberduck, or the hosting file manager.
- Backup plugin – Optional but handy for a clean migration.
Choosing the Right Hosting Plan
Hosting for WordPress can be broken down into three main types. Each has its own price range and suitability for small businesses or beginners.
- Shared Hosting – $3–$15/month. Ideal for first sites; easy to manage and cost‑effective. Hostinger’s shared plans are a top pick for speed and beginner friendliness.
- Cloud Hosting – $10–$30/month. Scales automatically with traffic, good for growing blogs or small stores. Still affordable and often includes managed WordPress features.
- VPS or Dedicated – $20–$60/month+. Best for high traffic or custom server requirements. Requires more technical knowledge.
For most WordPress websites—especially those just starting out—a shared plan with managed WordPress support is enough. Hostinger’s managed WordPress hosting offers a one‑click install, free SSL, and a daily backup feature, keeping costs low while ensuring performance.
Speed and Security Basics
Once your site is live, speed and security become top priorities. Keep these quick checks in mind:
- Use a caching plugin like W3 Total Cache or WP Rocket (free or paid).
- Enable a CDN – Cloudflare or the host’s built‑in CDN to serve static files faster.
- Keep WordPress core, themes, and plugins updated to patch vulnerabilities.
- Install a security plugin such as Wordfence or Sucuri for firewalls and malware scans.
- Use strong passwords and two‑factor authentication for all admin accounts.
Step‑by‑Step Migration: From Localhost to Live
Follow this concise workflow to get your site online with minimal fuss.
- Export the Database
- Open phpMyAdmin on your local server.
- Select your WordPress database.
- Choose Export → Quick → SQL and save the file.
- Upload Site Files
- Connect to your Hostinger account via FTP or the file manager.
- Navigate to public_html (or the folder you want).
- Upload all WordPress files from your local folder.
- Create a New Database
- In Hostinger’s control panel, go to Databases → Create New DB.
- Note the database name, username, and password.
- Import the Database
- Open phpMyAdmin on Hostinger.
- Select the new database.
- Use Import to upload the SQL file you exported earlier.
- Update wp-config.php
- Open the file in your editor.
- Replace DB_NAME, DB_USER, and DB_PASSWORD with your Hostinger credentials.
- Adjust Site URLs
- In phpMyAdmin, run the following query (replace yourdomain.com):
UPDATE wp_options SET option_value = 'https://yourdomain.com' WHERE option_name IN ('siteurl', 'home');
- In phpMyAdmin, run the following query (replace yourdomain.com):
- Test the Live Site
- Visit your domain and verify pages load correctly.
- Check the admin panel at yourdomain.com/wp-admin.
- Set Up Redirects (Optional)
- If you changed URLs, add 301 redirects in .htaccess or use a plugin.
- Activate SSL
- In Hostinger, enable the free SSL certificate for your domain.
- Force HTTPS via a plugin or wp-config.php.
- Backup Your Live Site
- Install a backup plugin or use Hostinger’s daily backup feature.
Final Checklist Before Launch
- All internal links use the live domain.
- Images and media load correctly.
- Permalinks are set (Settings → Permalinks).
- SEO plugins (Yoast, Rank Math) are configured.
- Security and caching plugins are activated.
FAQ
Can I migrate a WordPress site using a plugin?
Yes. Plugins like All-in-One WP Migration or Duplicator can automate the process, but they may require a paid version for large sites.
What is the difference between a free SSL and a paid one?
Free SSL certificates (e.g., Let’s Encrypt) are sufficient for most small businesses. Paid SSLs can offer extended validation and warranty, but the added cost is usually unnecessary for beginner sites.
Do I need to reinstall themes and plugins after migration?
No. All theme and plugin files are uploaded with your site files. Just ensure they are activated in the new admin panel.