Local Community

Setup Bedrock Site

I am looking to set up a Bedrock site in local by Flywheel.

My client’s old site was built in Bedrock and they would like me to host it for them again and make changes using the files their old developer has sent me.

I have no idea how to do this, I have tried to follow guides but keep getting stuck.

See the email below from the developer. I have already taken a download of the files by the way.

Hi both

Wordpress theme and SQL database available for next 7 days to download https://we.tl/t-ThknJEKYck

As mentioned in previous thread to Jonathan:


Hi Jonathan,

The old site was built using Bedrock (although an older version), with Composer to include plugins, and WordPress 4.1 - but without work from us to get it setup locally, I can’t give you a full working copy of the site.

What I can give you is the theme which can be used to recreate the site, along with the plugin list below.

There is also a copy of the database from October 2017.

I have no additional uploaded media backup - although I don’t believe there would have been more than a few blog post images

I hope that help, let me know if you have any questions? The site was put together in 2014 I think, so if you wanted a quote for a new site design/development, let me know

Many thanks

Matt


“wpackagist-plugin/advanced-custom-fields” : “4.3.9”,
“wpackagist-plugin/better-wp-security” : “4.5.10”,
“wpackagist-plugin/regenerate-thumbnails” : “2.2.4”,
“wpackagist-plugin/wordpress-seo” : “1.7.1”,
“wpackagist-plugin/sitemap” : “4.3”,
“wpackagist-plugin/google-sitemap-generator” : “4.0.8”,
“wpackagist-plugin/duplicate-post” : “2.6”,
“wpackagist-plugin/tablepress” : “1.5.1”,
“wpackagist-plugin/wp-user-avatar” : “1.9.17”,
“wpackagist-plugin/google-analytics-for-wordpress” : “5.2.8”,
“wpackagist-plugin/redirection”: “2.3.14”,

In addition it used:

gravity-forms - 1.9.1.15 (pro licence I think, but doesn’t need to be)
wp-visual-composer - 4.3.4

I’m using Mac Os and have the flywheel local downloaded.

On the guide below I got as far as setting up the site (although it didn’t let me choose the environment).

I don’t know what it means by ‘From ~/Local Sites/bedrock/app/ , run:’ so that is as far as i have got.

Any help would be appreciated. Feel free to email me > [email protected]

Hey Chedercon, welcome to the forums!

Although I haven’t setup a bedrock site personally, I can assist you with some of the steps in this guide. The current step you are hung up on looks to be the section titled “Install Bedrock” shown below:

The step reading:

From ~/Local Sites/bedrock/app/, run:

is describing a directory path in your computer’s file tree, and the instructions are requiring that you navigate to your Local site’s file tree in the computer terminal window. In the example their site resides at the path /Local Sites/bedrock/ and they are moving to the /app directory stored there in the site’s root directory. Once there, they are running the following text based command:

$ composer create-project roots/bedrock

Note: Your site’s specific path may be different than the default path found in this guide, thankfully you can find your site’s expected path pretty easily in the Local Client at the top of the screen when clicked into your environment, here is what one looks like on my end:

So in my case the expected path would be:

/Users/madison.sadler/Local Beta Sites/madisonsadler

And to get to that path in my terminal window i just need to open terminal and type:

pwd

which will print my working directory or current location in the file tree, example below:

Screen Shot 2020-01-16 at 1.34.05 AM

From this screenshot we can gather that my current working directory is /Users/madison.sadler and the path we would need to navigate to from here to run the text command would be:

/Local Beta Sites/madisonsadler/app

So to get there in my terminal window i will run:

$ cd Local\ Beta\ Sites/madisonsadler/app

Which will navigate me to the /app folder in terminal:

from here i would be able to proceed with the next step, where i would copy and past this text:

composer create-project roots/bedrock

directly into my terminal, and then press Enter to run the command.

1 Like

UPDATE!!:

I have found the location in terminal i just formated it the wrong way.

When i type the next command it says command not found.

composer create-project roots/bedrock

Awesome! And thank you for the screenshot. Based on the screenshot it looks like you will need to change directory into the /app location, you can do that by running:

cd Local\ Sites/jellyactrics/app

cd = change directory

Once this is done the

Customerpluss-iMac:~ customerplus$

will update to read:

Customerpluss-iMac:~ app$

Seeing this change will confirm you are in the correct location, you can also run pwd to confirm that.

It looks like when you ran the composer create-project roots/bedrock you included the $, you can skip the addition of the dollar sign. The dollar sign is really just included to indicate that this is a terminal command, and as you can see it is present in terminal by default:

Customerpluss-iMac:~ customerplus$

So once you have cd'ed into the correct directory copy and past the composer create-project roots/bedrock command leaving out the $ sign and you should see some different results. If the results are the same after following these steps then you will probably need to install Composer in order for terminal to recognize these commands.

Thanks again! So I seem to be able to change the location but when I type the composer create-project roots/bedrock command it says command not found.

So I looked up ‘Compose’ and installed it via their instruction.

I then tried the commands again and had no luck.

In order for composer to be accessible at any time, you’ll need to install it globally. See https://getcomposer.org/doc/00-intro.md#globally

You’re 95% of the way there, you just need to move the composer.phar file to /usr/local/bin/composer :smiley:

1 Like

I think I have installed it globally as per the guide given.

I then located to the folder (cd Local\ Sites/jellyactrics/app) and then tried the command as requested above (composer create-project roots/bedrock) and still said ‘command not found’.

Although I can not find a folder as described ‘/usr/local/bin/composer’ to move the composer.phar file

I am happy to keep trying your suggestions but i am conscious i am wasting your time.

If you/anyone can help get this site up a running just so i can take a normal wordpress backup of the site so i can host it with my normal flywheel account i would be very grateful as i can not find any other support on this.

I can send all the files and i have been sent on wetransfer and happy to pay to get the backup file.

Not a problem at all! There may also be other readers who find value from this as well :slight_smile:


Based on your screenshot above, I don’t see the mv command to move the Composer.phar file into /usr/local/bin.

I just confirmed that the following works on macOS:

  1. Follow the instructions in the following link and run the first two commands: https://getcomposer.org/download/
  2. Instead of running php composer-setup.php, run
    php composer-setup.php --install-dir=/usr/local/bin --filename=composer
    
  3. Run the last command that includes unlink
  4. Verify that you can run composer

When you say

Do you mean these to steps? (see attached)

Because when I try the second step: php composer-setup.php --install-dir=bin this does nothing.

I fully appreciate your support but i am really losing patience/time on this as we are in differnt time zoes and my boss wants this site sorted as soon as possible. Id be happy to write my solution on this post when we have sorted it if you can help me.

My email is [email protected]

Just an FYI. It’s really much simpler to install many of these commands via Homebrew, https://brew.sh

Then brew install composer

2 Likes

Agreed. :sweat_smile:

@chedercon, I’d take Andy’s advice here :stuck_out_tongue:

2 Likes

Thanks for the Advice @afragen this seems to have done something, to i then tried the ‘composer create-project roots/bedrock’ and it worked.

So seem to be at the 'Update .env’ part of the guide. Where do I go from here?

Ignore the command below that I tried after ‘creating bedrock files’ I thought this was the next stage of the guide:

Customerpluss-iMac:~ customerplus$ -root /app/public/;
-bash: -root: command not found
Customerpluss-iMac:~ customerplus$ +root /app/bedrock/web/;

Rock on.

See my response here regarding updating the root: Adding Bedrock to Local version 5

root isn’t a command to run in Terminal. Instead, it’s a directive you’ll need to update in your site’s conf/nginx/site.conf.hbs.

I’m completely lost…

Can we start again, based on the fact I have apparently installed the bedrock folder, what are my next steps.

See screenshot below of my folders if that helps. I also closed the terminal by accident so its a fresh new window.

I cant stress enough how much I’m willing to pay for someone just to set this site up as a working WordPress site so I can take a copy and list it on my flywheel online hosting. I appreciate this is a support forum but Im completely our my depth trying to understand this. Please email me if you can and we can set something up and fill in this forum with the solution accordingly > lawrencejohns[email protected]

To my knowledge, Bedrock is not compatible with Flywheel’s hosting offerings.

Since you’re hosting with Flywheel, you may want to reconsider your use of Bedrock and try a standard, non-Bedrock WordPress installation in Local.

Unless you have a specific project requirement to use Bedrock and are familiar with Composer, I highly recommend using a standard WordPress installation.


With that said…

Based on your screenshots, it looks like the Bedrock files are not inside the site’s app directory. Now that Composer is installed, you need to run composer create-project roots/bedrock while inside the site’s app directory.

In your previous screenshot where you ran composer create-project roots/bedrock, I can see that it was ran from ~ which is your home directory and not the site’s directory.

To run it from the site’s app directory, first right-click on the site in Local’s sidebar and then go to “Open Site Shell.” Doing so will open up Terminal and automatically change into the site’s app/public directory. However, since Bedrock needs to be installed in the app directory and not app/public, you will first need to go to the parent app directory by typing cd ../. Then, run composer create-project roots/bedrock.

Once you do that, follow the instructions under " Update .env" in the following article: https://roots.io/guides/local-bedrock-development-with-local-by-flywheel/

If you’re on Lightning (Local 5 and newer), you’ll need to follow the steps I outlined in this post rather than the steps under " Update Local’s nginx config" in the article above.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.