Skip to content

Need help/tips on hosting a codeigniter application on google cloud platform

twitter logo github logo ・1 min read  

As the title suggests, I need help & tips on hosting a CodeIgniter application on Google Cloud Platform. Using app engine and PHP 7.

Current pain points

  • Unable to connect to the database

  • Handling file uploads (to cloud storage I suppose, but from within the Codeigniter app)

  • Accessing assets ~ currently using base_url('path/to/asset') and this is not working. The app deploys successfully but I cannot access my CSS/JS

  • Where do static assets go?

Folder structure

  - public
    - assets
     - css
     - js
    - uploads (uploads go here)
     - images
     - thumbnails

  - ci
    - application
    - system

Hopefully this helps.

Another pain point

What is the host name for the database to be used in PHP?

twitter logo DISCUSS (5)
markdown guide

@allanjeremy DM me. I don't know GCP but I can help you troubleshoot the issue. All systems are the same: request, connectivity, authorization, processing, response. We can work through then on your app.


Hello David, thanks a lot. Can't DM you on here if we don't both follow each other here (followed you). Do let me know how we can proceed with this.



A simplest method to host Codeigniter or any other php based apps on google cloud platform is by using a php mysql web hosting platform that automates the process. Or you can use server provisioning tools, like Ansible.

Classic DEV Post from Mar 16

Loneliness in tech

I'll preface this with a quick bit about me: I've been a remote worker for just over 5 years now, typ...

Allan N Jeremy profile image
King Maker • Future billionaire • Inventor • Software engineer • Flutter • Node • Unreal engine • Vue & a bunch of tech I'd be more of a nerd admitting