<?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: Jason Lotzer</title>
    <description>The latest articles on DEV Community by Jason Lotzer (@jason_lotzer_b2a8e1f0361d).</description>
    <link>https://dev.to/jason_lotzer_b2a8e1f0361d</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%2F3658040%2Fd1a89ba0-f5c6-4ba1-a4df-5de71958ee42.jpg</url>
      <title>DEV Community: Jason Lotzer</title>
      <link>https://dev.to/jason_lotzer_b2a8e1f0361d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jason_lotzer_b2a8e1f0361d"/>
    <language>en</language>
    <item>
      <title>🚀 The Fastest Way to Spin Up Magento + Warden + Hyvä on macOS &amp; Linux (Introducing mage-mirror)</title>
      <dc:creator>Jason Lotzer</dc:creator>
      <pubDate>Fri, 12 Dec 2025 03:11:21 +0000</pubDate>
      <link>https://dev.to/jason_lotzer_b2a8e1f0361d/the-fastest-way-to-spin-up-magento-warden-hyva-on-macos-linux-introducing-mage-mirror-31nm</link>
      <guid>https://dev.to/jason_lotzer_b2a8e1f0361d/the-fastest-way-to-spin-up-magento-warden-hyva-on-macos-linux-introducing-mage-mirror-31nm</guid>
      <description>&lt;p&gt;If you’ve ever tried setting up a fresh Magento 2 environment — or worse, cloning a production store to debug something locally — you know the pain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Long install times&lt;/li&gt;
&lt;li&gt;Packages failing during Composer setup&lt;/li&gt;
&lt;li&gt;OpenSearch errors&lt;/li&gt;
&lt;li&gt;Warden mismatches&lt;/li&gt;
&lt;li&gt;Missing PHP extensions&lt;/li&gt;
&lt;li&gt;Admin login issues&lt;/li&gt;
&lt;li&gt;Slow upgrade rehearsals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After years of repeating the same environment setup steps, I decided to automate the entire process into one tool:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;** mage-mirror — a one-command Magento + Warden + Hyvä environment installer.**&lt;br&gt;
GitHub: &lt;a href="https://github.com/j-scriptz/mage-mirror" rel="noopener noreferrer"&gt;https://github.com/j-scriptz/mage-mirror&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In under &lt;strong&gt;2 minutes&lt;/strong&gt;, mage-mirror sets up a complete Magento environment with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Magento 2.4.x&lt;/li&gt;
&lt;li&gt;Warden (Docker) stack&lt;/li&gt;
&lt;li&gt;Hyvä theme (optional)&lt;/li&gt;
&lt;li&gt;Sample data (optional)&lt;/li&gt;
&lt;li&gt;Multi-store routing&lt;/li&gt;
&lt;li&gt;Composer configuration&lt;/li&gt;
&lt;li&gt;OpenSearch auto-fix&lt;/li&gt;
&lt;li&gt;Admin auto-creation&lt;/li&gt;
&lt;li&gt;Remote sync &amp;amp; cloning&lt;/li&gt;
&lt;li&gt;Upgrade mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using it feels like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./_mage-mirror.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…and bam — Magento is ready.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fn40u0m5xlr6b1lkddx9l.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fn40u0m5xlr6b1lkddx9l.gif" alt="A quick gif showing _mage-mirror.sh in action and the results of the local Hyva theme installed" width="560" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below I’ll walk through the features, how it works, and why I built it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Magento Local Development Is Still Too Hard
&lt;/h2&gt;

&lt;p&gt;Magento is powerful… but heavy.&lt;/p&gt;

&lt;p&gt;Local setup often involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installing PHP + Composer + MySQL manually&lt;/li&gt;
&lt;li&gt;Dealing with permission issues&lt;/li&gt;
&lt;li&gt;Fixing OpenSearch&lt;/li&gt;
&lt;li&gt;Waiting 20–40 minutes for Composer to finish&lt;/li&gt;
&lt;li&gt;Reindexing&lt;/li&gt;
&lt;li&gt;Troubleshooting crypt keys&lt;/li&gt;
&lt;li&gt;Patching configs&lt;/li&gt;
&lt;li&gt;Creating stores and scopes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you work with Magento professionally, the wasted hours add up fast.&lt;/p&gt;

&lt;p&gt;Hyvä makes frontend development dramatically faster, but &lt;strong&gt;the backend environment setup still bottlenecks teams&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I wanted a tool that solved this cleanly.&lt;/p&gt;




&lt;h2&gt;
  
  
  What mage-mirror Automates
&lt;/h2&gt;

&lt;p&gt;mage-mirror is built for &lt;strong&gt;speed&lt;/strong&gt;, &lt;strong&gt;repeatability&lt;/strong&gt;, and &lt;strong&gt;zero frustration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here’s what makes it different:&lt;/p&gt;




&lt;h2&gt;
  
  
  1. One Command = Full Magento Environment
&lt;/h2&gt;

&lt;p&gt;Just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./_mage-mirror.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installs Warden (if missing)&lt;/li&gt;
&lt;li&gt;Creates a project via Composer&lt;/li&gt;
&lt;li&gt;Sets up Magento 2.4.x&lt;/li&gt;
&lt;li&gt;Configures URLs and scopes&lt;/li&gt;
&lt;li&gt;Creates an admin user&lt;/li&gt;
&lt;li&gt;Deploys static assets&lt;/li&gt;
&lt;li&gt;Compiles DI&lt;/li&gt;
&lt;li&gt;Fixes file permissions&lt;/li&gt;
&lt;li&gt;Loads sample data (optional)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s everything you need with zero manual steps.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Hyvä Theme Auto-Setup (Optional)
&lt;/h2&gt;

&lt;p&gt;Want Hyvä?&lt;/p&gt;

&lt;p&gt;Just set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;INSTALL_HYVA&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;mage-mirror imports the Hyvä theme (via OSS composer mirrors), installs it, and activates it as the storefront.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Clone Existing Magento Projects (Local or Remote)
&lt;/h2&gt;

&lt;p&gt;This is where mage-mirror shines.&lt;/p&gt;

&lt;p&gt;You can clone:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your production store&lt;/li&gt;
&lt;li&gt;A staging environment&lt;/li&gt;
&lt;li&gt;A client’s site&lt;/li&gt;
&lt;li&gt;A QA snapshot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;rsync&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Remote &lt;code&gt;mysqldump&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Local SQL dumps&lt;/li&gt;
&lt;li&gt;Local env.php &amp;amp; config.php&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;USE_RSYNC_MAGENTO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes
&lt;/span&gt;&lt;span class="nv"&gt;USE_REMOTE_DB_DUMP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will have the store running locally in minutes — not hours.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Magento Upgrade Mode
&lt;/h2&gt;

&lt;p&gt;Need to test an upgrade from 2.4.x → 2.4.y?&lt;/p&gt;

&lt;p&gt;Set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;UPGRADE_MAGENTO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes
&lt;/span&gt;&lt;span class="nv"&gt;UPGRADE_MAGENTO_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2.4.&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;mage-mirror will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Import your existing store&lt;/li&gt;
&lt;li&gt;Adjust Composer version constraints&lt;/li&gt;
&lt;li&gt;Run a full Composer update&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;setup:upgrade&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reindex + compile + deploy&lt;/li&gt;
&lt;li&gt;Patch configs where needed&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a game-changer for developers who do maintenance work.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Multi-Store Routing (Preconfigured)
&lt;/h2&gt;

&lt;p&gt;If enabled, mage-mirror automatically maps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mage.test → Website A
app.mage.test → Website B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updates &lt;code&gt;/etc/hosts&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Patches &lt;code&gt;pub/index.php&lt;/code&gt; to set &lt;code&gt;MAGE_RUN_CODE&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Sets base URLs&lt;/li&gt;
&lt;li&gt;Configures scopes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No manual steps needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. OpenSearch Auto-Fix (No More “No alive nodes found”)
&lt;/h2&gt;

&lt;p&gt;This error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Could not validate a connection to OpenSearch. No alive nodes found.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…is one of the most common Magento headaches.&lt;/p&gt;

&lt;p&gt;mage-mirror automatically configures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;catalog/search/engine &lt;span class="o"&gt;=&lt;/span&gt; opensearch
&lt;span class="nb"&gt;hostname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; opensearch
port &lt;span class="o"&gt;=&lt;/span&gt; 9200
prefix &lt;span class="o"&gt;=&lt;/span&gt; magento2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then triggers a full reindex.&lt;/p&gt;

&lt;p&gt;You never see the error again.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;p&gt;Clone the repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/j-scriptz/mage-mirror
cd mage-mirror
chmod +x _mage-mirror.sh
./_mage-mirror.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll have Magento running at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mage.test" rel="noopener noreferrer"&gt;https://mage.test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://app.mage.test" rel="noopener noreferrer"&gt;https://app.mage.test&lt;/a&gt; (if multi-store enabled)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Example Configurations
&lt;/h2&gt;

&lt;p&gt;All settings live in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_mage-mirror.config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Quick Hyvä install:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;INSTALL_HYVA&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes
&lt;/span&gt;&lt;span class="nv"&gt;WITH_SAMPLE_DATA&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;no
&lt;span class="nv"&gt;USE_EXISTING_DB&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;no
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clone production store:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;USE_RSYNC_MAGENTO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes
&lt;/span&gt;&lt;span class="nv"&gt;USE_REMOTE_DB_DUMP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes
&lt;/span&gt;&lt;span class="nv"&gt;REMOTE_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;myserver
&lt;span class="nv"&gt;REMOTE_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/var/www/magento
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Upgrade mode:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;UPGRADE_MAGENTO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;yes
&lt;/span&gt;&lt;span class="nv"&gt;UPGRADE_MAGENTO_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2.4.&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Who Should Use mage-mirror?
&lt;/h2&gt;

&lt;p&gt;This tool is perfect for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Magento agencies&lt;/li&gt;
&lt;li&gt;Freelancers&lt;/li&gt;
&lt;li&gt;Hyvä developers&lt;/li&gt;
&lt;li&gt;Magento upgrade specialists&lt;/li&gt;
&lt;li&gt;Contributors&lt;/li&gt;
&lt;li&gt;Junior devs who need a one-click setup&lt;/li&gt;
&lt;li&gt;Teams who want standardized local environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you touch Magento regularly, mage-mirror saves you &lt;em&gt;hours every week&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bonus: Free Hyvä-Compatible Subcategory Cards
&lt;/h2&gt;

&lt;p&gt;During setup, you can auto-install the &lt;strong&gt;Jscriptz Subcats&lt;/strong&gt; module:&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://mage.jscriptz.com/jscriptz-subcats.html" rel="noopener noreferrer"&gt;https://mage.jscriptz.com/jscriptz-subcats.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great for storefront UX and Hyvä builds.&lt;/p&gt;




&lt;h2&gt;
  
  
  Want to Support the Project?
&lt;/h2&gt;

&lt;p&gt;If mage-mirror saved you time, the best way to support it is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Star the GitHub repo&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;Share this article&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;Submit issues or PRs&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;Help spread the word in the Magento community&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/j-scriptz/mage-mirror" rel="noopener noreferrer"&gt;https://github.com/j-scriptz/mage-mirror&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Magento development is complex — but local environments don’t have to be.&lt;/p&gt;

&lt;p&gt;mage-mirror was built to eliminate the pain points that developers repeatedly run into, and to make spinning up or cloning a Magento store as easy as running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./_mage-mirror.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>warden</category>
      <category>magento2</category>
      <category>devops</category>
      <category>hyva</category>
    </item>
  </channel>
</rss>
