TLDR; This Laravel China tutorial provides a step-by-step solution to deploy and host your Laravel apps on China servers.
What is Laravel?
Laravel is a modern web application framework developed and written in PHP. Active communities support Laravel, resulting in a sizeable plug-in or libraries available for faster web development.
21YunBox provides a Laravel deployment solution in China with just a few clicks (see steps below).
How to Deploy Laravel apps in China?
- Get a 21YunBox account if you dont have one already
- Create a database
- Create a Cloud Service on the 21YunBox
- Allow the 21YunBox Build to access your repo (read-only)
- Set your deployment settings
Then, click “Advanced Configuration” to add environment variables (if needed):
KEY | VALUE |
---|---|
APP_ENV | production |
DB_CONNECTION | pgsql |
DATABASE_URL | You can find the Database URL in the “Database > Settings.” |
APP_KEY | Paste the key generated by php artisan key:generate --show |
Then, click “Deploy.” That’s it. And your Laravel app will be deployed inside China in just minutes.
What you have done in the above steps is set up a 21YB build CI/CD pipeline. When code is pushed to your repo, this build pipeline will automatically build and deploy your site live in China.
Need help getting your Laravel stack in China?
21YunBox, a cross-border company, has worked with several fortune 500 enterprises and offices in the U.S. and Shanghai. We can assist you in every phase of your china hosting strategy to make your video, website, and content delivery in China at the best speed and advise you on the best channels to promote your business in China.
Contact us today, and our experts will explain to you all the secrets of making your site live in China!