Comment on page
Setting up a WooCommerce store in Codesphere
WooCommerce is the leading e-commerce plugin for WordPress. It is highly customizable, open-source and given the right hosting setup can power large e-commerce businesses. Setting it up in Codesphere is really simple.
Navigate to the team where you want to create your store and click new workspace.
Select the WordPress template, provide a name for your application and select a plan (for testing the small plan will be sufficient, for any production environment go for Boost or higher):
To create a new MySQL database follow these steps:
- 1.Navigate to
- 2.Select the MySQL from the services
- 3.Provide name and select resources
- 4.Hit Create
- 5.Once provisioned, click
- 6.You will need these in the next step
The provisioning will take some time (~3 min), after that continue.
Back in your created Codesphere workspace open
html/wp-config.phpand scroll to the database settings.
Edit the following entries of the WordPress installation to point them to the correct database (DB_NAME, DB_USER, DB_PASSWORD, DB_HOST).
Make sure to append the port (:25060 for DigitalOcean) to your DB_HOST
We recommend the use of environment variables for securely storing sensitive information such as secrets or passwords. However, in this instance, we directly input these details into the wp-config.php file on the server side. As we ensure this file is excluded from our repository commits, this method does not compromise the security of the sensitive data in this particular case.
Copy the string snippet generated into your wp-config file, replacing the empty keys.
Navigate to CI Pipeline, select the run stage and click the run button. Now Wordpress will start up.
Open your deployment and follow the steps on the screen to finish up the WordPress installation.
Now you have a clean WordPress installation, if you want to install WooCommerce it’s just a few clicks away via the Plugins tab. Follow the guided steps and you will have your shop up and running in no time.
Check out the following tutorials to learn more: