Skip to content

Commit 1b9793b

Browse files
authored
Update how-to-set-up-a-basic-staging-environment-for-magento-2.md
1 parent ff79ccb commit 1b9793b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/ecommerce-applications/magento-2/how-to-set-up-a-basic-staging-environment-for-magento-2.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ magerun2 --root-dir=/data/web/magento2 db:dump --strip="@stripped" --stdout | my
7272

7373
Now to use the staging environment, we need to change the base URL's to use the ports for the staging environment. This way your site is accessible through the same URL's as the production shop but will be using different ports. We change the HTTP port to 8888 and the HTTPS port to 8443.
7474

75-
`**`Please note the we often see conflicts when the unsecure and the secure Base-URLs are not the same. So either set both Base-URLs to HTTP -> 8888 or both URLs to HTTPS -> 8443. For example:
75+
Please note the we often see conflicts when the unsecure and the secure Base-URLs are not the same. So either set both Base-URLs to HTTP -> 8888 or both URLs to HTTPS -> 8443. For example:
7676

7777
```nginx
7878
| id | code | unsecure_baseurl | secure_baseurl |
@@ -89,13 +89,13 @@ OR:
8989
```
9090

9191
Use the following command to change the ports of your staging shop, but use your own domains. You can do this for a single storefront or for all of them.
92-
This way, if your live shop is `[https://www.example.com/](https://www.example.com/%60)`, your staging environment will be accessible on `[https://www.example.com:8443/](https://www.example.com:8443/%60)`
92+
This way, if your live shop is `https://www.example.com/`, your staging environment will be accessible on `https://www.example.com:8443/`
9393

9494
#### Change the Base URL's for a Single Storefront Using Magerun
9595

9696
```nginx
9797
cd /data/web/staging
98-
export SHOPHOST="mynode.hypernode.io"
98+
export SHOPHOST="example.hypernode.io"
9999
magerun2 --root-dir=/data/web/magento2_staging config:store:set web/unsecure/base_url http://$SHOPHOST:8888/
100100
magerun2 --root-dir=/data/web/magento2_staging config:store:set web/secure/base_url https://$SHOPHOST:8443/
101101
magerun2 --root-dir=/data/web/magento2_staging cache:flush
@@ -122,7 +122,7 @@ A big thank you to our partner [Experius](https://www.experius.nl/) for providin
122122

123123
#### Manually Change the Base URL's of Your Storefronts
124124

125-
If you want to set the base URL's manually, check [our documentation](../magento-1/how-to-change-the-base-url-in-magento-1-x.md) on changing your base URL's for Magento 1. Do you have a Magento 2 shop, please check [this article](how-to-change-your-magento-2-base-urls.md) on changing base URL's.
125+
If you want to set the base URL's manually, check [this article](how-to-change-your-magento-2-base-urls.md) on changing base URL's.
126126

127127
### Step Seven: Change All References in Your Staging Directory
128128

@@ -139,7 +139,7 @@ Keep in mind:
139139
- Regenerate your sitemap as it may still contain links to your live site.
140140
- Change all custom links and references that are in your staging installation pointing to the production install.
141141

142-
Now you should be able to reach your Magento 2 staging environment on <http://mynode.hypernode.io:8888>
142+
Now you should be able to reach your Magento 2 staging environment on `http://example.hypernode.io:8888`
143143

144144
For additional configuration and troubleshooting refer to the [Magento 1 staging environment article](../magento-1/how-to-set-up-a-staging-environment-for-magento-1.md)
145145

@@ -151,11 +151,11 @@ For example. Your live Base-URL `https://www.example.com` and your staging envir
151151

152152
If you want to use Varnish for the staging URL make sure to use an unique domain so both domains have their own cache. To do this you can either use the Hypernode domain, or create a subdomain for yourself. For example:
153153

154-
live: [https://www.example.com/](https://example.com/)
154+
live: `https://www.example.com/`
155155

156-
staging: <https://APPNAME.hypernode.io:8443/>
156+
staging: `https://example.hypernode.io:8443/`
157157

158-
or: [https://staging.example.com:8443/](https://staging.example.com/%3C.code%3E)
158+
or: `https://staging.example.com:8443/`
159159

160160
In the example above the domain for the staging environment is always different than the one from the live environment and therefor the Varnish cache won't get mixed up.
161161

0 commit comments

Comments
 (0)