DEV Community

Cover image for How I keep xDebug in php.ini.hbs in LocalWP consistent
Aubrey Portwood
Aubrey Portwood

Posted on • Edited on

1

How I keep xDebug in php.ini.hbs in LocalWP consistent

When you setup LocalWP and switch PHP versions it re-creates various php.ini.hbs files for each version (and the currently running) of PHP.

The problem is that it resets the xDebug config to use port 9003 every time. Furthermore it always turns off autostart in xDebug v3.

I want my port to be 9021 in every PHP version, and I want autostart on by default. But when I switch PHP versions my configuration isn't retained.

So, I wrote a small script to help me keep my php.ini.hbs files consistent if it's ever de-configured my PHP version switching.

  • Check it out here

Top comments (0)

Dev Diairies image

User Feedback & The Pivot That Saved The Project

🔥 Check out Episode 3 of Dev Diairies, following a successful Hackathon project turned startup.

Watch full video 🎥

👋 Kindness is contagious

Discover fresh viewpoints in this insightful post, supported by our vibrant DEV Community. Every developer’s experience matters—add your thoughts and help us grow together.

A simple “thank you” can uplift the author and spark new discussions—leave yours below!

On DEV, knowledge-sharing connects us and drives innovation. Found this useful? A quick note of appreciation makes a real impact.

Okay