We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53065
    • 5 Posts
    I spend some time to make modx works on AWS beanstalk without finding any information online. I share my steps to transfer a modx install to AWS beanstalk. The database is a Google Cloud SQL database (but works also with Amazon RDS or any other cloud database).
    For the next steps I assume EB CLI is already installed.
    Step 0: backup the database of your source modx installation
    Step 1: download modx (same version as the one installed locally)
    Step 2: unzip modx in a directory (for example <my_dir>)
    Step 3: copy your source assets, core/components and core/package directories to the corresponding directories in the target installation (<my_dir> in the example).
    Step 4: initialise your EB client (>eb init) from <my_dir>
    Step 5: create your Elastic Beanstalk environment eb create dev-env from <my_dir> (>eb create name_of_environment)
    Step 6: CRITICAL! create a config file in the directory .elasticbeanstalk (in <my_dir>) to give write permissions on your modx installation to the webapp
    filename: my_app.config
            command: "chmod -R ug+w /var/app/ondeck/*"

    You can refine the permissions as you wish.
    Step 7: go to xxxxxxxx.elasticbeanstalk.com/setup to launch modx setup (xxxxxxxxxxx is your domain on EB). Select new install. Connect to your database with a different prefix for the tables as the one you have in the existing installation. You might encounter an error "server not responding" at the last step of the installer. If not, don't delete the setup folder at the last step.
    Step 8: check it works by connecting to xxxxxxxx.elasticbeanstalk.com (you should see the default modx site)
    Step 9: go to xxxxxxxx.elasticbeanstalk.com/setup and select advanced update. Change the prefix of modx tables to the prefix of your source installation. Finish installation
    Step 10: connect to xxxxxxxx.elasticbeanstalk.com, you should find your previous website. If not it is because of caching. Go to the manager, clear cach and it will work.

    You might customise this process depending on your needs but I hope it will help to avoid waste so much time because of step 6 ;-)
    [ed. note: winceosg last edited this post 7 years, 5 months ago.]
      • 3749
      • 24,544 Posts
      Thanks! I'm sure that will help someone. smiley
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting