Both can be excellent. The right choice depends on what you need the site to do and who will manage it.
You want to edit content yourself, launch quickly and keep costs reasonable. It suits business sites, blogs, portfolios and most online stores. A well-built theme with few plugins is fast and secure.
You need complex logic that plugins cannot handle, such as booking engines, portals, large integrations or software products. Custom code gives full control and can be very fast, but costs more and needs a developer for every change.

Answer these before deciding:
| Factor | WordPress | Custom PHP |
|---|---|---|
| Build time | 2 – 4 weeks | 8 – 16 weeks |
| Initial cost | Lower | Higher |
| Easy self-editing | Yes | Needs admin build |
| Flexibility | High with plugins | Unlimited |
Yes, when kept updated with strong passwords, limited plugins and regular backups.
Yes. Content can be migrated, so starting with WordPress rarely locks you in.
An honest comparison of WordPress and custom-coded websites on cost, speed, security, flexibility and maintenance, with a simple way to decide.