DEV Community

How to set up your wordpress site on dokku

Jasmine Tracey on July 08, 2020

This post will cover everything you need to know about getting WordPress deployed to your dokku server from start to finish. I already have a dokk...
Collapse
 
dvjones89 profile image
Dave Jones

Thanks for this fantastic write-up, Jasmine, I had a Wordpress installation running in Dokku within 10 minutes flat 🙌🏼

One tiny correction, for the benefit of future readers, the final command where we're enabling letsencrypt for the blogger application should include the word "enable"

dokku letsencrypt:enable blogger
Enter fullscreen mode Exit fullscreen mode
Collapse
 
leandertolksdorf profile image
Leander Tolksdorf

I get this error when trying to push to the dokku host:

-----> Unable to select a buildpack
remote: 2022/01/03 10:53:44 exit status 1
remote: 2022/01/03 10:53:44 exit status 1
To myhost.com:app
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'myhost.com:app'
Enter fullscreen mode Exit fullscreen mode

How can I fix this?

Collapse
 
mahedicse profile image
Md Mahedi Hasan

I'm getting this error: "The theme directory "twentytwentythree" does not exist.
Error: The themes directory is either empty or does not exist. Please check your installation." and unable to install any theme and plugins

Collapse
 
eventyret profile image
Simen Daehlin

Amazing guide thank you! It seems that after applying Letsencrypt all CSS will be broken and so will all js etc. Any good solution @jasminetracey

Collapse
 
jasminetracey profile image
Jasmine Tracey

From your admin panel under settings you can change your WordPress Address (URL) and your Site Address (URL) to the https version.

Collapse
 
vomba profile image
vomba

Hey, doing that makes the website inaccessible, browser says too many redirects.

Thread Thread
 
jasminetracey profile image
Jasmine Tracey • Edited

This article should help

wpbeginner.com/wp-tutorials/how-to...

Collapse
 
bi_khadija profile image
Bhamiji Khadija Mahanga

Can you use wordpress docker image on dokku?

Collapse
 
jasminetracey profile image
Jasmine Tracey

yes

Collapse
 
joshco profile image
Josh

I am getting 404's for all pages except the main page. wp-admin works.
Is there something I need to do for URL rewrites instead of .htaccess ?

Collapse
 
jasminetracey profile image
Jasmine Tracey

You can try adding options +FollowSymLinks to your .htaccess file

Collapse
 
joshco profile image
Josh • Edited

I changerd my Procfile to use apache rather than nginx, and it picked up my standard wordpress .htaccess file and it works without 404s

Procfile
web: vendor/heroku/heroku-buildpack-php/bin/heroku-php-apache2

I found this voodoo here: github.com/dokku/dokku/issues/824
It looks like it may be related to a newer or older version of buildstep.