xyu / heroku-wp

WordPress on Heroku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Themes nor Plugins cannot be added

evanjmg opened this issue · comments

To add local plugins and themes, you can create plugins/ and themes/ folders inside /public/wp-content which upon deploy to Heroku will be copied on top of the standard WordPress install, themes, and plugins specified by Composer.

^ the following above does not work my file structure is as following:
Screen Shot 2019-12-26 at 12 45 00 PM
and my composer json is the following

{
    "name": "xyu/heroku-wp",
    "description": "A template for installing and running WordPress on Heroku",
    "homepage": "https://github.com/xyu/heroku-wp",
    "license": "MIT",
    "authors": [
        {
            "name": "Evan",
            "email": "",
            "homepage": "",
            "role": "Developer"
        }
    ],
    "require": {
        "ext-gd": "*",
        "php": "7.*",

        "wordpress/wordpress": "*",

        "automattic/batcache": "dev-master",
        "wpackagist-plugin/redis-cache": "~1",
        "wpackagist-plugin/secure-db-connection": "~1",

        "humanmade/s3-uploads": "~2",
        "wpackagist-plugin/jetpack": "*",
        "wpackagist-plugin/sendgrid-email-delivery-simplified": "~1",

        "predis/predis": "~1",
        "wp-cli/wp-cli": "^2",
        "wpdesk/wp-forms": "^1.0"
    },
    "suggest": {
        "wpackagist-plugin/cloudflare-cache-purge": "Purges cached pages on CF.",
        "trepmal/wp-revisions-cli": "WP CLI tool for cleaning up revisions (dev-master)"
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "wordpress/wordpress",
                "version": "5.2.3",
                "dist": {
                    "type": "zip",
                    "url": "https://github.com/wordpress/wordpress/archive/5.2.3.zip"
                }
            }
        },
        {
            "type": "vcs",
            "url": "https://github.com/xyu/batcache"
        },
        {
            "type": "composer",
            "url": "https://wpackagist.org"
        },
        {
            "type": "composer",
            "url": "https://wp-cli.org/package-index"
        }
    ],
    "extra": {
        "installer-paths": {
            "vendor/wordpress/wordpress-ext/wp-content/mu-plugins/{$name}/": [
                "automattic/batcache",
                "wpackagist-plugin/redis-cache",
                "wpackagist-plugin/secure-db-connection"
            ],
            "vendor/wordpress/wordpress-ext/wp-content/plugins/{$name}/": [
                "type:wordpress-plugin"
            ],
            "vendor/wpdesk/wp-forms": [
                "type:wordpress-plugin"
            ],
            "vendor/wordpress/wordpress-ext/wp-content/themes/{$name}/": [
                "type:wordpress-theme"
            ],
            "public/wp-content/themes/{$name}/":  [
                "type:wordpress-theme"
            ]
        }
    },
    "scripts": {
        "post-install-cmd": [
            "./support/app_slug_compile.sh"
        ]
    }
}

I committed the above and built but neither wp-forms added via composer nor local files or zips are being installed on building the app in heroku with: git push heroku slug:master -

UPDATE: I still have this issue with local files but all themes and plugins on wordpress packagist work

Inside the wpforms-lite directory, did the folder contain the php file?

You shouldn't put the zip file at the plugins folder too.

The plugin file containing the plugin header. As per defined in https://developer.wordpress.org/plugins/plugin-basics/header-requirements/

Example:

<?php
/**
 * Plugin Name: YOUR PLUGIN NAME
 */

Ah thanks - just found in the docs for themes, noticed one of my themes was missing it's index - https://developer.wordpress.org/themes/basics/organizing-theme-files/ ; the other strangely started working after installing other plugins. I'm closing this, hopefully others will find this useful. Thank you for triaging.