Home > Backend Development > PHP Tutorial > How to deploy old php website to koyeb

How to deploy old php website to koyeb

Mary-Kate Olsen
Release: 2024-12-29 08:45:11
Original
998 people have browsed it

How to deploy old php website to koyeb

I have this side project with me since 2007, it is an one file php website with sqlite db and some pictures and js and css. I am keeping it just to monitor sometime how are the things at php side.

Anyway when I first build up this site I was using shared hosting, and in time I moved to dedicated server and today I decided to move to koyeb.com which is a nice cloud provider.

How to move old php code to cloud, I followed these steps

  1. I copied all code and files to my github repo
  2. created composer.json file with below text
{
  "require": {
     "php": "^8.1",
     "ext-pdo": "*",
     "ext-pdo_sqlite": "*"
 }  
}

Copy after login
  1. Installed composer as described here and ran composer update which will generate vendor folder and composer.lock
  2. Create Procfile file
web: heroku-php-apache2 ./

Copy after login
  1. push all to git
  2. Go to koyeb console and deploy it to mini instance from github

I did not try to use Dockerfile but it can be configured with that too according to this page.

Reference:

  • PHP Example

The above is the detailed content of How to deploy old php website to koyeb. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template