<p>If you follow the instructions here: <a href="https://nystudio107.com/blog/local-development-with-vagrant-homestead" rel="nofollow noreferrer">Local Development with Vagrant / Homestead</a> and can't get it working, let me know.</p>

<p>That's the exact procedure I use whenever I set it up; I just did it 3 weeks ago to set up a new machine running Homestead without incident.</p>

CC BY-SA 3.0
2017-07-16T20:25:38.767Z
2017-07-16T20:25:38.767Z
andrew.welch
<p>I'm running Vagrant/Virtual Box on a Windows 10 host.</p>

<p>I originally installed Craft on a Vagrant Scotch Box (<a href="https://box.scotch.io/" rel="nofollow noreferrer">https://box.scotch.io/</a>). The admin panel was running a little slow so I tried installing in on a Laravel Homestead box after reading that many developers were using this solution.</p>

<p>I had many problems getting this to work, and when I did get it working the performance problems were worse than with my original installation.</p>

<p>First problem was the missing mcrypt extension in PHP 7. If you Google for a solution, you will see this:</p>

<pre><code>sudo apt-get install php7.1-mcrypt
</code></pre>

<p>This command, although it runs ok does not result in the extension actually being installed. phpinfo shows that the extension is still not available.</p>

<p>I tried enabling Apache using the Homestead Yaml settings to see if that made any difference. It did not.</p>

<p>After doing an update and an upgrade in the Ubuntu shell, I was finally able to get the mcrypt extension running with a slightly different command: </p>

<pre><code>sudo apt-get install php-mcrypt
</code></pre>

<p>After this I was able to run the Craft installer, but the site was running even slower, CSS files for the admin panel were intermittently failing to load, and database requests were extremely slow.</p>

<p>I started seeing weird MySQL errors, which were apparently a result of an incompatibility with the latest version of MySQL. This problem was resolved by adding the following to the my.cnf file in Ubuntu:</p>

<pre><code>sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
</code></pre>

<p>This change did not improve the performance issues however.</p>

<p>I reverted back to Nginx to see if that would fix the problem. It did not. I then destroyed the vagrant box and started again with a brand new box. </p>

<p>This time I was not able to get the mcrpyt extension running at all, using either form of the Ubuntu package installer commands. It kept hanging at one of the "processing triggers" steps.</p>

<p>Homestead works great for Laravel and the performance is snappy, but for me getting it to play nice with Craft has been a disaster. </p>

<p>I am going to stay with Scotch Box for now, which runs on PHP 5.6 &amp; MySQL 5.0.</p>

<p><strong>Note</strong>: The "nfs" setting is enabled for both of these vagrant boxes, and vagrant-winnfsd (1.3.1) is installed. </p>

<p>I would be interested to know if anybody else had a similar experience and managed to get everything working?</p>

CC BY-SA 3.0
2017-07-11T23:46:06.110Z
Not an answer to your question, but I know there are many Homestead/Craft users.  Maybe try posting in the #devops channel in the Craft Slack group with a link to this thread.  https://craftcms.com/community#slack
Brad Bell
<performance><mcrypt>
Laravel Homestead installation nightmare
# Laravel Homestead installation nightmare

(Asked by: username_0 on 2017-07-11)

I'm running Vagrant/Virtual Box on a Windows 10 host.
I originally installed Craft on a Vagrant Scotch Box (https://box.scotch.io/). The admin panel was running a little slow so I tried installing in on a Laravel Homestead box after reading that many developers were using this solution.
I had many problems getting this to work, and when I did get it working the performance problems were worse than with my original installation.
First problem was the missing mcrypt extension in PHP 7. If you Google for a solution, you will see this:
sudo apt-get install php7.1-mcrypt

This command, although it runs ok does not result in the extension actually being installed. phpinfo shows that the extension is still not available.
I tried enabling Apache using the Homestead Yaml settings to see if that made any difference. It did not.
After doing an update and an upgrade in the Ubuntu shell, I was finally able to get the mcrypt extension running with a slightly different command: 
sudo apt-get install php-mcrypt

After this I was able to run the Craft installer, but the site was running even slower, CSS files for the admin panel were intermittently failing to load, and database requests were extremely slow.
I started seeing weird MySQL errors, which were apparently a result of an incompatibility with the latest version of MySQL. This problem was resolved by adding the following to the my.cnf file in Ubuntu:
sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

This change did not improve the performance issues however.
I reverted back to Nginx to see if that would fix the problem. It did not. I then destroyed the vagrant box and started again with a brand new box. 
This time I was not able to get the mcrpyt extension running at all, using either form of the Ubuntu package installer commands. It kept hanging at one of the "processing triggers" steps.
Homestead works great for Laravel and the performance is snappy, but for me getting it to play nice with Craft has been a disaster. 
I am going to stay with Scotch Box for now, which runs on PHP 5.6 & MySQL 5.0.
Note: The "nfs" setting is enabled for both of these vagrant boxes, and vagrant-winnfsd (1.3.1) is installed. 
I would be interested to know if anybody else had a similar experience and managed to get everything working?

**Tags:** performance, mcrypt
> **Comments:**
> **username_1**: Not an answer to your question, but I know there are many Homestead/Craft users.  Maybe try posting in the #devops channel in the Craft Slack group with a link to this thread.  https://craftcms.com/community#slack  

---

## 1 answers

### Answer by username_2 on 2017-07-16. Score: 1

If you follow the instructions here: [Local Development with Vagrant / Homestead](https://nystudio107.com/blog/local-development-with-vagrant-homestead) and can't get it working, let me know.

That's the exact procedure I use whenever I set it up; I just did it 3 weeks ago to set up a new machine running Homestead without incident.


---

