How to load WordPress into a REPL for interactive use?

I have found tools like PsySH to be invaluable for interacting with PHP, but recently I have attempted to debug some issues in WordPress that would be much easier to resolve if I were able to load up the WP environment within PsySH or even attach an existing WP install instance to it.

Any ideas on how to do this, i.e. load up WP within a repl or attach it to a WP installation?

  • Ivan

    Hey there ylluminate,

    Hoe you are having great weekend so far!

    I am sorry to tell you this, but I haven't used PsySH.
    Looking at their usage here, I think you should be able to include it directly in the WordPress core files, or if you prefer on a theme or a plugin.

    Anyway I am not sure how that would work out.

    I will be happy if any of our members who have experience with it share his insight here. :slight_smile:

    Thanks,
    Ivan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.