Skip to content

Instantly share code, notes, and snippets.

@botris
Last active October 15, 2018 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save botris/f8d3b0c8d131ed8c01dc180b76e0eb80 to your computer and use it in GitHub Desktop.
Save botris/f8d3b0c8d131ed8c01dc180b76e0eb80 to your computer and use it in GitHub Desktop.
Install Contenta.

Installing https://www.contentacms.org/ on OS X.

Check current composer version

composer --version

If lower then 1.7 update:

composer self-update

Try auto download:

php -r "readfile('https://raw.githubusercontent.com/contentacms/contenta_jsonapi_project/8.x-1.x/scripts/download.sh');" > download-contentacms.sh
chmod a+x download-contentacms.sh
./download-contentacms.sh /path/to/new-dir-for-contenta

If that does not work locate composer.phar and download:

php -d memory_limit=-1 /path/to/composer.phar create-project contentacms/contenta-jsonapi-project /path/to/new-dir-for-contenta --stability dev --no-interaction --remove-vcs --no-progress --prefer-dist

After that, copy .env.example into .env and add the database connection details. NOTE: it is highly recommended to use .env.local to store your credentials, since that file is ignored by git.

# Example .env file.
SITE_MAIL=admin@localhost
ACCOUNT_MAIL=admin@localhost
SITE_NAME='Contenta CMS Demo'
ACCOUNT_NAME=admin
MYSQL_DATABASE=contenta
MYSQL_HOSTNAME=localhost
MYSQL_PORT=3306
MYSQL_USER=contenta
# Example .env.local file.
MYSQL_PASSWORD=contenta
ACCOUNT_PASS=admin

Create the database with credentials. Install the contanta Drupal profile:

cd /path/to/new-dir-for-contenta
composer run-script install:with-mysql
cd web
drush config-set system.file path.temporary /path/to/temp -y
drush cr

Now either set up your local webserver for the new location or use inbuild PHP webserver:

drush user-login --no-browser --uri="http://127.0.0.1:8888"
drush runserver 127.0.0.1:8888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment