<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: imranalam21510</title>
    <description>The latest articles on DEV Community by imranalam21510 (@imranalam21510).</description>
    <link>https://dev.to/imranalam21510</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F881415%2Fc2155b7f-e27d-4bed-9e7b-dd495b468f67.png</url>
      <title>DEV Community: imranalam21510</title>
      <link>https://dev.to/imranalam21510</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/imranalam21510"/>
    <language>en</language>
    <item>
      <title>How to use LocalXpose with a Localhost WordPress</title>
      <dc:creator>imranalam21510</dc:creator>
      <pubDate>Thu, 23 Jun 2022 09:05:25 +0000</pubDate>
      <link>https://dev.to/imranalam21510/how-to-use-localxpose-with-a-localhost-wordpress-cni</link>
      <guid>https://dev.to/imranalam21510/how-to-use-localxpose-with-a-localhost-wordpress-cni</guid>
      <description>&lt;p&gt;Are you working on a WordPress site on the localhost and want to share it with others? Or maybe you want to test how your site would work if it was live on the internet. LocalXpose can help with that! In this article, we'll show you how to set up a simple WordPress site on the localhost and then use LocalXpose to expose it to the internet.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is LocalXpose?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://localxpose.io/" rel="noopener noreferrer"&gt;LocalXpose&lt;/a&gt; is a reverse proxy that enables you to expose your localhost to the internet. It is useful for developers who want to share their localhost with others, or for anyone who wants to access their localhost from a remote location. LocalXpose has many useful features, some of them are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi Protocols and Regions:&lt;/strong&gt; Nowadays, most developers work in a distributed environment, with team members located in different parts of the world. LocalXpose makes it easy to share your localhost with others by allowing you to start an HTTP, TLS, TCP, or UDP tunnel in any of the three major regions ( US, Europe, Asia Pacific).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Custom Domains and Endpoints:&lt;/strong&gt; With LocalXpose, you can select your own custom domain ( example.com ) or subdomain (dev.loclx.io), or even an endpoint on a specific port ( us.loclx.io:8080 ). This makes it easy to share your localhost with others without having to remember a complicated URL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built-in Let's Encrypt:&lt;/strong&gt; LocalXpose makes it easy to create a let's encrypt certificate for your custom domain with one click. This way, you can share your localhost with others securely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built-in File Server:&lt;/strong&gt; LocalXpose comes with a built-in file server, so you can easily share any local system directory with others.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Edit Requests and Response Headers:&lt;/strong&gt; LocalXpose also allows you to edit the request and response headers of your http tunnel. This is useful if you need to adapt your environment for a specific purpose.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started with LocalXpose
&lt;/h2&gt;

&lt;p&gt;Before you can start using LocalXpose, you'll need to install it on your device. LocalXpose is available for Windows, macOS, Docker, and Linux, so you can run it regardless of your operating system. The installation process is very simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Go to the &lt;a href="https://localxpose.io/" rel="noopener noreferrer"&gt;LocalXpose&lt;/a&gt; website.&lt;br&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Click the "Download" button on the navigation bar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qc5moazzqgirqme6ehy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qc5moazzqgirqme6ehy.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Choose your operating system and download the zip file.&lt;br&gt;
&lt;strong&gt;Step 4:&lt;/strong&gt; Unzip the file and that's it! You're now ready to start using LocalXpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up a Localhost WordPress Site
&lt;/h2&gt;

&lt;p&gt;Before we can use LocalXpose to expose our localhost WordPress site to the internet, we need to set up a localhost WordPress site. Creating a WordPress website locally is a great way to test out new plugins and themes without affecting the live site. And if something goes wrong, you can always restore the site from a backup.&lt;/p&gt;

&lt;p&gt;If you don't have a localhost WordPress set up yet, don't worry. It's very easy to do. We'll walk you through the steps below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Download XAMPP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can download XAMPP on any operating software. You can choose your operating system while downloading the software. To download the software, simply go to the &lt;a href="https://www.apachefriends.org/download.html" rel="noopener noreferrer"&gt;Apache Friends website&lt;/a&gt; and click on the "Download" button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcchimkefkfommkib2rfy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcchimkefkfommkib2rfy.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Install XAMPP on your device&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the download is complete, open the installer and follow the instructions. By default, it will install all the components. If you want, you can deselect the components that you don't want and install them later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0ewyzx4f1tv5wuegsqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0ewyzx4f1tv5wuegsqw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Start the XAMPP Control Panel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After installation, launch the XAMPP Control Panel. On the XAMPP Control Panel, you will see all the services that come with XAMPP. Apache and MySQL are the two services that we need to start for WordPress.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvfw247yvn33dedafw5vh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvfw247yvn33dedafw5vh.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Create a Database for WordPress&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that the Apache and MySQL services are running, we can create a database for WordPress.&lt;/p&gt;

&lt;p&gt;To do that, open your browser and go to &lt;a href="http://localhost/phpmyadmin/" rel="noopener noreferrer"&gt;http://localhost/phpmyadmin/&lt;/a&gt; . On the phpmyAdmin page, click on the "Databases" tab.&lt;/p&gt;

&lt;p&gt;Enter a name for your database in the "Create database" field and click on the "Create" button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flez8upxjqnw6py5ihk0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flez8upxjqnw6py5ihk0p.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Install WordPress&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we have a database set up, we can install WordPress. To do that, go to the WordPress website and click on the "Download WordPress" button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwzrbxlyrrxkkenidlmtg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwzrbxlyrrxkkenidlmtg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the download is complete, extract the files and copy them to the htdocs folder. The htdocs folder is located in the XAMPP installation directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcqlz9iahe7lfwgv5mv3y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcqlz9iahe7lfwgv5mv3y.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After copying the files, rename the wp-config-sample.php file to wp-config.php. Open the wp-config.php file and enter your database information. Save the file and close it.&lt;/p&gt;

&lt;p&gt;Now, open your browser and go to &lt;a href="http://localhost/wordpress" rel="noopener noreferrer"&gt;http://localhost/wordpress&lt;/a&gt; . You should see the WordPress setup page. Follow the instructions on the setup page to finish installing WordPress.&lt;/p&gt;

&lt;p&gt;Now your WordPress is set up. If you go to &lt;a href="http://localhost/wordpress" rel="noopener noreferrer"&gt;http://localhost/wordpress&lt;/a&gt; then you can see your site.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fon7vnb2adkzmv4rguh1x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fon7vnb2adkzmv4rguh1x.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Exposing the Localhost WordPress Site with LocalXpose
&lt;/h2&gt;

&lt;p&gt;Now that we have a localhost WordPress site set up, we can use LocalXpose to expose it to the internet. LocalXpose makes it easy to expose your localhost WordPress site to the internet. Just follow the steps below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Open a terminal and change the directory to where you have installed the LocalXpose.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssze5qrgkztpg8imtdkr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssze5qrgkztpg8imtdkr.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Use LocalXpose's HTTP tunnels to expose your localhost URL to the internet. HTTP tunnels allow you to expose your local web servers to the internet, and you will be given a shareable link that is accessible from the internet.&lt;/p&gt;

&lt;p&gt;To generate this shareable link, run the below command in the terminal:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

loclx tunnel http --to 80


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That's it. Now the shareable link should be visible on your screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwgqqn48yzznvrpbnruig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwgqqn48yzznvrpbnruig.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2m3r94h29fcxwwa1xpp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2m3r94h29fcxwwa1xpp.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, we've shown you how to use LocalXpose to expose your localhost WordPress site to the internet. LocalXpose is a very handy tool that can be used to share your localhost site with others or to test how your site would work if it was live on the internet.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>localhost</category>
      <category>localxpose</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
