Menu

Static React + PHP bookings on shared hosting: lessons from building a tourism website
πŸ“°

Static React + PHP bookings on shared hosting: lessons from building a tourism website

DEV Community: phpΒ·Marwan TaziΒ·about 18 hours ago
#uCeRQMtC
#devto#dev#organisation#admin#html
Long article (1464 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Our team recently built the website for our outdoor activity business near Marrakech (quad biking, buggy tours and camel rides). The brief sounded simple:

it must rank on Google for very local keywords;

customers must be able to book online;

we need a dashboard to confirm or refuse bookings;

everything must run on a cheap shared hosting plan (Hostinger, LiteSpeed, PHP, MySQL). No Node server and no VPS.

Here is the architecture we ended up with, the traps we fell into, and what we would do differently.

1. The stack

Front end: React 19, TanStack Router, Tailwind CSS 4, Vite

Rendering: static site generation (SSG) with a custom prerender script

Back end: a few plain PHP 8.3 files + MySQL (PDO)

Hosting: shared LiteSpeed server with a CDN in front

Browser ──► CDN ──► LiteSpeed β”œβ”€β”€ /index.html, /activites/…/index.html (prerendered React) β”œβ”€β”€ /api/reserver.php, /api/devis.php (bookings, quotes) └── /admin/index.php (owner dashboard)

Enter fullscreen mode

Exit fullscreen mode

The idea: everything a…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.