Cloning local bedrock site on different computer

We have a local development env with Local + Bedrock with composer on PC (setup using this tutorial: https://www.youtube.com/watch?v=wNSaP-O5wrk). PHP 8.0.0, nginx 1.16.0, MariaDB 10.4.10
Now want to clone that site and create another local development environment on a Mac. We’ve tried to create a new local site on a newly installed Local app on a Mac with the closest available PHP, MariaDB versions and then tried to merge plugin versions in the composer.json file and finally run composer install to install every plugin, theme. This of course didn’t work.
We got multiple errors like:
“your requirements could not be resolved to an installable set of packages”
“your lock file does not contain a compatible set of packages. Please run composer update.”

And the new Local app does not have the same PHP, MariaDB versions and looks like we can’t add the ones we need (the ones we used with the local development version on a PC). So the question is - is this possible to clone the local dev environment? How to add particular PHP versions, since installing the new flywheel app doesn’t have ones we need? Thank you!

I’ve also tried to export the site but the process stops somewhere in the middle, not sure how to debug this.

Hi @karaliunas

We’ll try to assist you here but working with Bedrock can certainly be tricky. We’ve had a feature request for supporting it out there for awhile here if you want to upvote or comment:

There are also a lot of Bedrock troubleshooting threads throughout the forums if you haven’t checked already they might have some useful insight:

https://community.localwp.com/search?q=bedrock

For some clarification here in order for us to help further:

  • What is your OS/OS version? You mention Mac, are you trying to use MariaDB on this machine?

  • What particular PHP version(s) do you need?

  • For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

1 Like

Hi Nick and thanks for willingness to help!
The current local development env is on PC with Win 10 Enterprise Ver 22H2, OS build 19045.3930 64-bit
The machine we try to import the website is Macbook Pro with Mac OS: 13.6.4 (22G513). Freshly downloaded local app doesn’t have MariaDB as a choice, so we selected MySQL 8.0.16, nginx webserver and PHP 8.0.30.

I was able to export the site in second try.
And we use Migrate DB by delicious brains to sync DB between environments.

Attached logs from PC development env:
local-logs.zip (715.2 KB)

MariaDB is only supported on Windows currently. We have a feature request here for support on MacOS for this if you want to vote, comment or follow along:

You mentioned that “I was able to export the site in second try” so do you still have any errors or issues you’re running into or are things otherwise working how you need them to?

Still having an issue of importing the site to other machine. This time I’ve tried to import the site on other Win 10 Pro PC computer. It imports all the files, but the computer crashes with “Your device run into problem and needs to restart…” bluescreen. Tried two times with the same result. It happens during DB import. As I said, I use PHP 8.0.0 on local development env. But the new Local app doesn’t have this PHP version, the closest I found is 8.0.30. Database is the same version MariaDB 10.4.10. Upon opening the site locally I get “404 Not found” white page. Attaching the log file from that problematic PC computer.
I’ve also found the nginx error.log full of similar messages:
024/03/07 20:15:52 [crit] 2904#3816: *1 GetFileAttributesEx() “C:\Users 430\Local Sites\sitename\app\bedrock\web/” failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: , request: “GET / HTTP/1.0”, host: “sitename.local”

which is a wrong path obviously, the user name is ‘t430’ so this is how I set the root in the site.conf.hbs:
root “C:\Users\t430\Local Sites\sitename\app\bedrock\web” but it looks like username first letter was replaced/escaped. How can I avoid this strange behavior?

local-logs.zip (12.2 KB)

So I added two slashes before username in the URL in the site.conf.hbs and the server connected to site, showing wordpress page “Cannot select database”, so now the question is how to check if database was created correctly (I doubt it very much) And is this possible to import DB manually ? Thanks!

So I managed to manualy copy paste DB file and then everything turned out OK. But in the end the main issue still exists - how to add specific PHP versions to Local app? This is the only one pain point left with all this saga :slight_smile:

OK, so my issue is resolved now. The problem was the PHP version set for Composer during installation, I then reinstalled Composer with the right PHP version selected during installation and was able to use composer to update / add plugins.

Hi @karaliunas! I was just circling back to your thread here and am so glad to hear you got things working! We appreciate you sharing your updates here for others to find that may need your guidance!