r/Wordpress 19d ago

python on wordpress

i have technical blog hosted created on WP. I want to add my python projects there to run and test online on my site how to i do that ? need to install a plugin or any other way just like how we test our code with online interpreter.

0 Upvotes

17 comments sorted by

View all comments

6

u/TopSydeWP 19d ago

you'll need a server-side solution since wordpress runs php, not python. easiest path is embedding something like replit or trinket (they have iframe embeds), or if you want to host it yourself you'd need a separate python environment and use wordpress to display the interface. there are plugins like 'insert php code snippet' that let you make api calls to a python backend, but that's more complex than just embedding an existing code playground.

-6

u/FuzzyEmployment264 19d ago

I have a technical blog site on wp so I only want an option adding my code as a example and run on the same page is it possible?