How to Move Localhost Website To Live

๐Ÿš€ Moving a WordPress site from your computer to a live server is easier if you follow these steps:


๐Ÿ—„๏ธ 1. Backup Your Website

Before doing anything, create a full backup (database + files).
๐Ÿ‘‰ Recommended Tool: UpdraftPlus


๐Ÿ–ฅ๏ธ 2. Export Your Local Database

  • Open phpMyAdmin on your local server.
  • Select your WordPress database โ†’ Export โ†’ Quick โ†’ SQL.
    ๐Ÿ‘‰ Guide: Exporting Databases with phpMyAdmin

๐Ÿ“‚ 3. Upload WordPress Files to Live Host

  • Use FTP client like FileZilla or your hostโ€™s File Manager.
  • Upload everything from your local WordPress folder to your hosting accountโ€™s public_html (or root directory).

๐Ÿ›ข๏ธ 4. Create a Database on Live Host

  • Log into your cPanel (or hosting dashboard).
  • Go to MySQL Databases โ†’ create new DB & user.
    ๐Ÿ‘‰ Tutorial: How to Create a MySQL Database in cPanel

๐Ÿ”„ 5. Import Your Local Database

  • Open phpMyAdmin on your live host.
  • Select the new database โ†’ Import โ†’ upload the exported .sql file.

โš™๏ธ 6. Update wp-config.php

Edit the file in your root directory:

define( ‘DB_NAME’, ‘your_live_db_name’ );

define( ‘DB_USER’, ‘your_live_db_user’ );

define( ‘DB_PASSWORD’, ‘your_live_db_password’ );

define( ‘DB_HOST’, ‘localhost’ );

๐Ÿ‘‰ Guide: Editing wp-config.php


๐ŸŒ 7. Fix URLs in Database

  • Go to wp_options table โ†’ update siteurl and home with your live URL.
  • Or install Better Search Replace to update all links.

๐Ÿ”— 8. Reset Permalinks

  • Log into WordPress dashboard.
  • Go to Settings โ†’ Permalinks โ†’ Save Changes (refreshes links).

โœ… 9. Test Your Live Site

  • Visit your domain and check if pages, images, and plugins work.
  • Troubleshoot with WordPress Support.

๐ŸŒ 10. Update DNS (if needed)

Point your domain to your hostโ€™s nameservers.
๐Ÿ‘‰ Guide: How to Change DNS Records


๐Ÿ”’ 11. Secure Your Site

  • Install SSL certificate for HTTPS (many hosts provide free Letโ€™s Encrypt).
  • Add a security plugin like Wordfence.

โœ… Done! Your WordPress site is now live ๐ŸŽ‰

Once you have completed these steps, your WordPress site should be successfully transferred from local to live. Make sure to thoroughly test all functionalities on your live site. Remember to regularly backup your website to prevent data loss. Consider implementing security measures such as SSL certificates and security plugins. Keep all themes, plugins, and WordPress core files updated to ensure optimal performance and security.