How to setup Wordpress alongside my existing Python app?

I have a Flask web app running on an Ubuntu 18 linode.

I want to install a Wordpress blog on this domain too for content marketing purposes. Ideally it would have this file/URL structure:

Clearly Wordpress has a very different set of software installs I need to make vs. my Flask app. Am I able to simply install the required software (LAMP) in the same virtual environment as my flask app then upload the relevant WP files under a new /blog subdirectory?

I came across the below Linode guide which seems to be aligned with what I am trying to do but thought I would get any initial pointers before going this route.

1 Reply

Hi @phas0r,

You should be able to install both on a Linode, but When installing WordPress, it needs to be either Apache or NGiNX, whichever flask already runs. If both are installed, they will compete for the same port and cannot bind to it, so I added links for both LEMP and LAMP for your quick reference.

Installing the LEMP Stack on Ubuntu 18.04

How to Install a LAMP Stack on Ubuntu 18.04

I also added guides to both Apache and NGiNX providing vHost and Server Blocks, respectively. I use them to verify my config.

VirtualHost Examples

Server Block Examples

I also found a third-party guide explaining how to set up the Server to run both Flask and WordPress using NGiNX.

Configuring WordPress Blog as sub-directory alongside Django in Nginx


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct