Is it possible to run a Python application on a WordPress site?

I have an idea for a web application and you plan to learn Python along the way (right now I know html / css, some javascript, some php and sql). An application could, among other things, manipulate and analyze audio files.

Ideally, I would like to make the application accessible through my WordPress site so that I can use the WordPress login control as well as the subscription and restrictions management features of the s2member plugin.

Is it possible? Would it even be reasonable?

If not, is there a better alternative to automating all this (subscription management, logins, payment processing, content limitation, etc.) without having to code it yourself?

+4
source share
2

REST API Python Wordpress API.

Python Flask Flask-RESTful.

Wordpress .

+3

, :

  • , WordPress, python
  • python .

( ) , :

call-python.php( ):

<php
/*
Plugin name: Call Python
Author:..
....
*/

$pyScript = "/path/to/app.py";

exec("/usr/bin/python $pyScript", $output);
var_dump($output);

python script app.py:

print("Hello, World")

! Hello, . , python, .

, " " . - python WordPress, .

+3

Source: https://habr.com/ru/post/1589507/


All Articles