Skip to content

How to deploy a wordpress site? #625

Answered by aka47
kishaningithub asked this question in Q&A
Discussion options

You must be logged in to vote

This is a very board question, usally you create a project with a Dockerfile. Here is the one I am using. You should have a look at the Wordpress Docker documentation, it is worth reading.

I use hetzner with a volume mounted under /mnt/volume-wordpress-data where all uploads and static files are stored.

FROM wordpress:latest

### Dependency Installation
RUN apt update && \
    apt upgrade -y && \
    apt install -y python3 vim less && \
### WP-CLI Installation
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
    chmod +x wp-cli.phar && \
    mv wp-cli.phar /usr/bin/wp-cli && \
    chmod 755 /usr/bin/wp-cli && \
    a2enmod headers && 
    
### Cle…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@aka47
Comment options

Answer selected by kishaningithub
@kishaningithub
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants