Making your locally-built WordPress site accessible to the public is a common next step for sharing your work or getting client feedback. There are two main paths you can take: a temporary solution using a tunnel for quick previews, or a permanent solution by migrating to a live hosting provider.
Here is a comparison of both methods to help you decide.
| Aspect | 🚀 Method 1: Temporary Access (via “Tunneling”) | 🌐 Method 2: Permanent Access (via Migration) |
|---|---|---|
| What It Is | Exposing your local computer to the internet using a tool (e.g., ngrok) to get a temporary public URL . | Moving your site’s files and database to a paid hosting provider (e.g., Bluehost, Kinsta) to go live permanently . |
| Best For | Quick client previews, testing plugins that need a public URL (like Jetpack), or gathering feedback on a work-in-progress . | Launching the final website, making it available 24/7 to the public, and getting your own domain name (e.g., www.yoursite.com) . |
| Pros | Free/Low Cost: Many tools offer a free tier . Immediate: No need to buy hosting or a domain upfront. Convenient: You continue working in your familiar local environment. | Professional: Provides a custom domain, better speed, and uptime . Always Online: Your computer doesn’t need to stay on . Secure: Hosting providers offer robust security and backups. |
| Cons | Computer Must Be On: Your PC must be running and awake for anyone to access the site . Temporary & Slow: The URL is often a random string of letters and can be slow . Security Risk: You are opening your local computer to the internet. | Costs Money: You’ll need to pay for a hosting plan and a domain name . More Complex: Requires a few technical steps to migrate the site, though many hosts offer one-click migrations . |
This is the best way to show a work-in-progress without buying anything. Tools like ngrok or Localtunnel create a secure tunnel to your computer .
How to do it (using ngrok as an example):
ngrok http 80 (use port 8080 if that’s what your local site uses) .https://abc123.ngrok.io). Anyone with this link can see your site.⚠️ A Critical Step for WordPress: Because your site’s internal links and images are hardcoded to http://localhost, clicking on them will break for remote users . To fix this, you must update your site’s URL. Add these two lines to your wp-config.php file (replace the URL with the one from ngrok):
define( 'WP_HOME', 'https://your-ngrok-url.ngrok.io' );
define( 'WP_SITEURL', 'https://your-ngrok-url.ngrok.io' );
After you are done previewing, remember to remove these lines to work locally again .
When you are ready to launch the final site, you should move it to a live server. This is the standard professional process.
How to do it (The 30,000-foot view):
.sql file) ..sql file into it .wp-config.php file with the live server’s database name, username, and password .http://localhost to http://yourdomain.com. You can do this in phpMyAdmin by changing the siteurl and home fields in the wp_options table .Pro Tip: For a simpler migration, look for a host that offers a free migration plugin (like Jetpack’s migration tool or a host-specific plugin) to handle the heavy lifting for you .
If you decide to go with the permanent migration and need help picking a hosting provider or a plugin to simplify the process, feel free to ask
Author Rank: 10
Author's Name: Guest User
User ID: 10000009
Number of posts published by user: 8
Comment
Comment Message Box Error
Please do not use newline break key!
be the first one to write a comment.