Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sman591/infinite-wp-dokku

Skeleton for deploying Infinite WP on Dokku
https://github.com/sman591/infinite-wp-dokku

dokku infinite-wp mysql php

Last synced: 21 days ago
JSON representation

Skeleton for deploying Infinite WP on Dokku

Awesome Lists containing this project

README

        

# Infinite WP on Dokku

Sets up a basic installation for [Infinite WP](https://infinitewp.com/) on [Dokku](http://dokku.viewdocs.io/dokku/).

- PHP 7
- Apache
- Files mounted via Dokku storage

## Dokku Setup

#### Create resources

```bash
dokku apps:create wp
dokku mysql:create wp
dokku mysql:link wp wp
```

#### Create storage

```bash
mkdir ~/storage
mkdir ~/storage/wp--html
```

#### Upload Infinite WP installation

1. Visit https://infinitewp.com/cpanel-installation/
2. Click the "Download and install" tab
3. Download the .zip of Infinite WP
4. Upload the contents of the .zip to Dokku at `~/storage/wp--html`

#### Fix file permissions

```
sudo chown -R 32767:32767 ~/storage/wp--html
sudo chmod +r ~/storage/wp--html/
```

#### Mount files to the Dokku app

```bash
dokku storage:mount wp /home/stuart/storage/wp--html:/app/html
dokku ps:rebuild
```

#### Link a domain

```bash
dokku domains:add wp wp.example.com
```

#### Secure using Let's Encrypt (optional)

```bash
dokku config:set --no-restart wp [email protected]
dokku letsencrypt wp
```

#### Fix HTTPS Support

For HTTPS support, InfiniteWP assumes the app is hosted on port 443. However, because Heroku's PHP buildpack runs on port 5000, InfiniteWP will attempt to "redirect" to port 443, causing an infinite loop.

To fix this, override the `$_SERVER` variables to convince InfiniteWP it's running with HTTPS.

```bash
sudo vim ~/storage/wp--html/_env.php
```

Fill the contents of this file with the following:

```php