However, other companies offer relatively cheap but top-notch hosting facilities. With all the web hosts out there promising high uptime scores, security, server reliability, friendly support, and unlimited resources, is there a way to cut the jargon and choose the best of all? Often, you will need to pay more to get your desired quality. It's not very sophisticated, but it gets you up and running quickly and there's room to refine from here.Choosing the right web host for your personal or business website is one tough decision you will ever make. Run composer install -no-dev, drush cex, and drush updb (drush cr if editing templates and code files). Dev gets done, push up the dev branch, log into server and merge into master. Locally, I pull that down and merge master into my dev branch, making sure that the dev branch was clean or had no forgotten/incomplete commits. If I do need to work locally, I log into the server, export config, and check it into git. That's why I try to include the base modules I need for a typical site before I push up the initial site. Bluehost is capable of installing composer packages from a lock file, but it crashes when adding a new one. One big caveat here is that I have to add new modules locally. To be specific, live site building = yes! live module development or theming = no! Late in the game it's no across the board. However to move quickly in these early stages, I need to be able to pull the config down locally and push up changes to the code. As a project matures, I'll do a lot more local dev and changes will go through QA before being released to production. When I first begin a project, I like to experiment and scaffold things out quickly so I can focus on the content and build up features around it. I do a lot of live development on the site, especially site building. Hope you remembered the password you made for the database :) Make sure to choose the Config Installer profile. You can't push master directly to the server, since it's checked out there.Ĭomposer install -no-dev (more info on that flag here: ) Git remote add origin out the current branch as dev. Set up your git instance on the server as a local remote: It's important have the path to your webroot (not the repo) and use the same name you set in your subdomain config on Bluehost. Initialize a git repo within that directory.ĬD into ~/public_html and symlink to your site: Instead, I created a ~/Go ahead and create ~/www/SITENAME It has some files we don't need since we're using Drupal to handle everything. Set up server git and web root directory.įirst we're going to delete the directory created by Bluehost. Hang on to the generated password, you'll need this to install Drupal.ģ. Use the database wizard to create a new database and user with all privileges. In the subdomains section, create a new one, named whatever you want, pointing to the default directory with the same name in public_html. Set up subdomain and database on bluehost. We'll want this when deploying the site.Įxport your site config with drush cex. Otherwise, it will reject the config from a "different" site if the uuids don't match. (You can require multiple modules on one line)Ĭonfig Installer is a profile that will load Drupal config when you install a site. This is also a good time to require any modules you want to include, via composer:Ĭomposer require drupal/admin_toolbar drupal/config_installer If you want to fire up this site locally, cd into the /web directory and run drush si -account-pass=admin. gitignore file that excludes the code managed by composer. Here's my quickstart guide for getting up and running with development.Ĭreate a local drupal project with composer:Ĭomposer create-project drupal-composer/drupal-project:8.x-dev some-dir -stability dev -no-interactionĬreate a git repo in this directory and check in the files. Full disclosure: I don't run any high traffic sites here and would recommend further research if heavy usage is expected. It's not the fastest, but it's cheap and reliable and there are upgrade options if needed. I started an account on Bluehost many years ago when I wanted to build a profile site.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |