GithubHelp home page GithubHelp logo

mhoofman / wordpress-heroku Goto Github PK

View Code? Open in Web Editor NEW
1.3K 72.0 706.0 32.81 MB

Template project for deploying WordPress to Heroku

License: Other

ApacheConf 0.01% PHP 72.43% HTML 0.57% CSS 13.94% JavaScript 13.03% Ruby 0.01%

wordpress-heroku's Introduction

WordPress Heroku

This project is a template for installing and running WordPress on Heroku. The repository comes bundled with:

Installation

Clone the repository from Github

$ git clone git://github.com/mhoofman/wordpress-heroku.git

With the Heroku gem, create your app

$ cd wordpress-heroku
$ heroku create
Creating strange-turtle-1234... done, stack is cedar
http://strange-turtle-1234.herokuapp.com/ | [email protected]:strange-turtle-1234.git
Git remote heroku added

Add a database to your app

$ heroku addons:create heroku-postgresql
Creating HEROKU_POSTGRESQL_INSTANCE... done, (free)
Adding HEROKU_POSTGRESQL_INSTANCE to strange-turtle-1234... done
Setting DATABASE_URL and restarting strange-turtle-1234... done, v3
Database has been created and is available
 ! This database is empty. If upgrading, you can transfer
 ! data from another database with pgbackups:restore
Use `heroku addons:docs heroku-postgresql` to view documentation.

Promote the database (replace HEROKU_POSTGRESQL_INSTANCE with the name from the above output)

$ heroku pg:promote HEROKU_POSTGRESQL_INSTANCE
Promoting HEROKU_POSTGRESQL_INSTANCE to DATABASE_URL... done
Ensuring an alternate alias for existing DATABASE... done, HEROKU_POSTGRESQL_COLOR
Promoting HEROKU_POSTGRESQL_INSTANCE to DATABASE_URL on strange-turtle-1234... done

Add the ability to send email (i.e. Password Resets etc)

$ heroku addons:create sendgrid:starter
Creating SENDGRID_INSTANCE... done, (free)
Adding SENDGRID_INSTANCE to strange-turtle-1234... done
Setting SENDGRID_PASSWORD, SENDGRID_USERNAME and restarting strange-turtle-1234... done, v7
Use `heroku addons:docs sendgrid` to view documentation.

Create a new branch for any configuration/setup changes needed

$ git checkout -b production

Store unique keys and salts in Heroku environment variables. Wordpress can provide random values here.

heroku config:set AUTH_KEY='put your unique phrase here' \
  SECURE_AUTH_KEY='put your unique phrase here' \
  LOGGED_IN_KEY='put your unique phrase here' \
  NONCE_KEY='put your unique phrase here' \
  AUTH_SALT='put your unique phrase here' \
  SECURE_AUTH_SALT='put your unique phrase here' \
  LOGGED_IN_SALT='put your unique phrase here' \
  NONCE_SALT='put your unique phrase here'

Deploy to Heroku

$ git push heroku production:master
-----> Deleting 0 files matching .slugignore patterns.
-----> PHP app detected

 !     WARNING: No composer.json found.
       Using index.php to declare PHP applications is considered legacy
       functionality and may lead to unexpected behavior.

-----> No runtime requirements in composer.json, defaulting to PHP 5.6.2.
-----> Installing system packages...
       - PHP 5.6.2
       - Apache 2.4.10
       - Nginx 1.6.0
-----> Installing PHP extensions...
       - zend-opcache (automatic; bundled, using 'ext-zend-opcache.ini')
-----> Installing dependencies...
       Composer version 1.0-dev (ffffab37a294f3383c812d0329623f0a4ba45387) 2014-11-05 06:04:18
       Loading composer repositories with package information
       Installing dependencies
       Nothing to install or update
       Generating optimized autoload files
-----> Preparing runtime environment...
       NOTICE: No Procfile, defaulting to 'web: vendor/bin/heroku-php-apache2'
-----> Discovering process types
       Procfile declares types -> web

-----> Compressing... done, 78.5MB
-----> Launcing... done, v5
       http://strange-turtle-1234.herokuapp.com deployed to Heroku

To git@heroku:strange-turtle-1234.git
  * [new branch]    production -> master

After deployment WordPress has a few more steps to setup and thats it!

Usage

Because a file cannot be written to Heroku's file system, updating and installing plugins or themes should be done locally and then pushed to Heroku.

Updating

Updating your WordPress version is just a matter of merging the updates into the branch created from the installation.

$ git pull # Get the latest

Using the same branch name from our installation:

$ git checkout production
$ git merge master # Merge latest
$ git push heroku production:master

WordPress needs to update the database. After push, navigate to:

http://your-app-url.herokuapp.com/wp-admin

WordPress will prompt for updating the database. After that you'll be good to go.

Deployment optimisation

If you have files that you want tracked in your repo, but do not need deploying (for example, *.md, *.pdf, *.zip). Then add path or linux file match to the .slugignore file & these will not be deployed.

Examples:

path/to/ignore/
bin/
*.md
*.pdf
*.zip

Wiki

wordpress-heroku's People

Contributors

adrianartiles avatar andrewjanssen avatar andrewmunsell avatar eddiejaoude avatar ericgj avatar gaaady avatar gianpaj avatar ibroadfo avatar jaxzin avatar justindthomas avatar marcocampana avatar mateusdelbianco avatar mhoofman avatar mps avatar workman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress-heroku's Issues

Wordpress 3.9 causing timeouts

Hello, I recently upgraded to Wordpress 3.9 and am seeing the blog continually timeout. The heroku logs show the following:

2014-04-30T17:59:48.184463+00:00 app[web.1]: [30-Apr-2014 17:59:47] WARNING: [pool www] child 48 said into stderr: "NOTICE: PHP message: PHP Warning: pg_query(): Query failed: ERROR: missing FROM-clause entry for table "session""
2014-04-30T17:59:48.184466+00:00 app[web.1]: [30-Apr-2014 17:59:47] WARNING: [pool www] child 48 said into stderr: "LINE 1: SELECT @@SESSION.sql_mode"
2014-04-30T17:59:48.184468+00:00 app[web.1]: [30-Apr-2014 17:59:47] WARNING: [pool www] child 48 said into stderr: " ^ in /app/wp-content/pg4wp/driver_pgsql.php on line 140"

Anyone else seeing this?

XMLRPC image upload not working

I've never had image upload work from any app that uses XMLRPC for posting. Despite the fact that WPRO claims "Full support for XMLRPC uploads." Is there a log I can look in for errors?

Anyone else experienced this? Simple test is to use the wordpress for iOS app (or any 3rd pary app) and try to upload an image.

I am able to upload images just fine using the media upload functionality built into the web interface.

Can't add images to an image gallery

After selecting images for an image gallery and saving, when re-opening the image gallery it is empty. I tested on a default wordpress installation and it works fine.

Custom permalinks keep breaking on heroku

Anyone know how to deal with this?

We're live on heroku with Day and Name permalinks, but on a pretty regular basis our custom permalink pages stop working. We can still see all of our posts in the index, but not the individual pages. If we just re-save from Settings > Permalinks, things start to work again so it seems like an index is breaking down somewhere.

I'm not super familiar with the WP set up enough to know exactly what's going... anyone have experience with this?

Issue connecting to database

I am getting error "can't contact the database server at ec2-...........compute-1.amazonaws.com port=5432. This could mean your host's database server is down. I have tried specifying the db connect info directly as well as leaving the config.php file as is from the repo. Any thoughts? The database is definitely in existence.

include S3 integration?

Hi!

I just tryied your repo out and it's great. Isn't S3 usage (or similar) mandatory for a wordpress on heroku?
couldn't a plugin be included in the repo?

i'm trying out tantan-s3-cloudfront but it doesn't seem to work.

Anyone has any tips?

Why the installation resets every day?

Hi;

I download some plugins from Wordpress to my blog(not to my local). It was working perfect. But some hours later, I see that they are gone from filesystem. Nothing happens to DB but the plug in files. Why it happens?

It happened only half an hour after I wrote this post.

Screen Shot 2013-01-31 at 1 59 39 PM

Error establishing a database connection

Whenever I visit my site for the first time in the morning, I get:
Error establishing a database connection

I receive the same error until I refresh 3-4 times, and then the site works as long as I keep hitting it.

It seems like something isn't running / needs to boot up / etc. but I have no idea how to configure the heroku/wordpress combo to keep the database running.

Bad instructions for setting up custom domain

Hi!

Great repo and great README! Just wanted to ask if you can fix the custom domain setup instructions. You should not be pointing your domain name to IP addresses. Instead use CNAME records to point it to the name of your herokuapp.

Docs here

Wordpress Media Upload

Hi Matt,

I've just had a quick look to your port for heroku and I have to say that it works very fine, I wonder to figure out with how to handle, in the better way media uploaded by the end users.

As you know we can't write on hk filesystem, or better I noticed that it works, but we have a limited amount of space in order to do that.

I tried to figure out how to upload media as BLOB inside the DB or use third party plugins like Dropbox Sync in order to use dropbox to host, as CDN, the media contents.

What's your point on this?

Unable to update plugins remotely

Hi,

Thanks for the scripts.
Just after installing a brand new wordpress, we can update Askimet from the Dashboard.
However, it does not work, it will freeze "Updating Askimet...".

Does it mean we need to do the updates locally and then push it to heroku?

Cheers,

Thomas

Comment Moderation Not Working

Comment moderation appears to be broken for me with the latest Wordpress and pg4wp plugin on heroku. See this screenshot:

http://cl.ly/2C1i0v3b3S0u2d242n2o

There is no checkbox to update the status of a comment, nor do I get the rollover effect that lets me instantly Approve, Spam, Trash, etc.

I am loged in as the administrator user for my Wordpress installation.

Can anybody else reproduce this?

Installing JetPack

Jetpack requires an authentication moment with Wordpress.com but that does not work for some reason when hosted on Heroku. Any ideas on how to get this plugin working with this setup?

Thanks

Transient 404 with permanent links

I observe a rather strange behaviour with my wordpress site.

When hitting an URL http://www.immistart.com/sculptures-by-the-sea-2013 it often gives a 404 error, but error goes away immediately after I log into admin console and load the permalink settings page (/wp-admin/options-permalink.php).

I suspect it's caused by heroku constantly unloading and restarting the site - some setting or a URL rewriting rule is probably not read during cold start, but gets checked/updated when admin requests options-permalink.php

Can anyone suggest a fix or a workaround for this?

Can't Create a new Post.

Looks like there is an issue with PG support.

error_log(/app/www//wp-content/pg4wp/logs/pg4wp_errors.log): failed to open stream: No such file or directory in /app/www/wp-content/pg4wp/driver_pgsql.php on line 184, referer:

Query failed: ERROR: relation "wp_options_seq" does not exist\nLINE 1: SELECT CURRVAL('wp_options_seq')\n ^ in /app/www/wp-content/pg4wp/driver_pgsql.php on

bbpress plugin, budypress

Hello all, i have trouble to add bbpress and buddypress on my wordpress installation. When i try to activate bbpress and some others plugin, i get heroku application error.
Any idea? i think it the plugin need mysql but i have not yet test on wamp

Installing plugins and updates in Wordpress with Heroku

I have been working with wordpress-heroku and I have been a little surprised to find out that you can't either update or install plugins directly in the server.

The method that has been suggested is that the upgrades and installs be made locally and then committed to the repository. But I find this process incredible tedious and annoying.

First I have to have a webserver installed. Luckily I have PHP5.4 installed and I can use the built in webserver

php -S localhost:8000

Then I have to connected, but it told me I need the Postgresql extension of PHP... so I installed it

Then it is telling me:

Connecting to your PostgreSQL database without a password is considered insecure. If you want to do it anyway, please set "PG4WP_INSECURE" to true in your "db.php" file.

So I have to add a

define( 'PG4WP_INSECURE', true);

to the configuration and now it tells me that it can't find the database (of course) and I realize that I need to build a mock up database every time I want to update my plugins.

All this seems really overkill. Is there a better way to work this problem?

Custom permalink formats don't persist after restarts

When I change the default permalink format to something else the site seems to work OK. If I restart it (heroku restart) the previous working links now return a 404 and the only working page seems to be the index. The logs show the following:

2012-01-04T00:41:06+00:00 app[web.1]: [Wed Jan 04 00:41:05 2012] [error] server reached MaxClients setting, consider raising the MaxClients setting
2012-01-04T00:41:06+00:00 app[web.1]: 10.12.238.225 - - [04/Jan/2012:00:41:06 +0000] "HEAD /wp-content/uploads/2010/07/kezee.jpeg?w=300 HTTP/1.1" 200 -
2012-01-04T00:41:06+00:00 heroku[router]: GET rockgeni.us/wp-admin/options-writing.php dyno=web.1 queue=0 wait=0ms service=302ms status=200 bytes=27968
2012-01-04T00:41:07+00:00 heroku[router]: GET rockgeni.us/favicon.ico dyno=web.1 queue=0 wait=0ms service=331ms status=404 bytes=209
2012-01-04T00:41:07+00:00 app[web.1]: [Wed Jan 04 00:41:07 2012] [error] [client 10.104.51.212] File does not exist: /app/www/favicon.ico
2012-01-04T00:41:07+00:00 app[web.1]: 10.217.13.195 - - [04/Jan/2012:00:41:06 +0000] "GET /wp-admin/options-writing.php HTTP/1.1" 200 27932
2012-01-04T00:41:07+00:00 app[web.1]: 10.104.51.212 - - [04/Jan/2012:00:41:07 +0000] "GET /favicon.ico HTTP/1.1" 404 209
2012-01-04T00:41:07+00:00 app[web.1]: 10.66.162.4 - - [04/Jan/2012:00:41:06 +0000] "GET /wp-admin/options-general.php HTTP/1.1" 200 48957
2012-01-04T00:41:07+00:00 heroku[router]: POST rockgeni.us/wp-admin/admin-ajax.php dyno=web.1 queue=0 wait=0ms service=245ms status=200 bytes=1
2012-01-04T00:41:08+00:00 heroku[router]: GET rockgeni.us/favicon.ico dyno=web.1 queue=0 wait=0ms service=4ms status=404 bytes=209
2012-01-04T00:41:08+00:00 app[web.1]: [Wed Jan 04 00:41:08 2012] [error] [client 10.104.51.212] File does not exist: /app/www/favicon.ico
2012-01-04T00:41:08+00:00 app[web.1]: 10.104.51.212 - - [04/Jan/2012:00:41:07 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 1
2012-01-04T00:41:08+00:00 app[web.1]: 10.104.51.212 - - [04/Jan/2012:00:41:08 +0000] "GET /favicon.ico HTTP/1.1" 404 209
2012-01-04T00:41:15+00:00 heroku[router]: GET rockgeni.us/wp-admin/tools.php dyno=web.1 queue=0 wait=0ms service=252ms status=200 bytes=21394
2012-01-04T00:41:16+00:00 heroku[router]: GET rockgeni.us/wp-admin/images/press-this.png dyno=web.1 queue=0 wait=0ms service=4ms status=200 bytes=818
2012-01-04T00:41:16+00:00 app[web.1]: 10.104.51.212 - - [04/Jan/2012:00:41:15 +0000] "GET /wp-admin/tools.php HTTP/1.1" 200 21365
2012-01-04T00:41:16+00:00 app[web.1]: 10.5.21.190 - - [04/Jan/2012:00:41:16 +0000] "GET /wp-admin/images/press-this.png HTTP/1.1" 200 818
2012-01-04T00:41:16+00:00 heroku[router]: GET rockgeni.us/favicon.ico dyno=web.1 queue=0 wait=0ms service=4ms status=404 bytes=209
2012-01-04T00:41:17+00:00 app[web.1]: [Wed Jan 04 00:41:16 2012] [error] [client 10.104.51.212] File does not exist: /app/www/favicon.ico
2012-01-04T00:41:17+00:00 app[web.1]: 10.104.51.212 - - [04/Jan/2012:00:41:16 +0000] "GET /favicon.ico HTTP/1.1" 404 209

I think the first line about the MaxClients setting might be relevant but I'm not sure of how to tune this with Heroku.

Configure MAMP for local development

Hi,

I follow all the steps and it's ok. Wordpress is installed on heroku and works correctly.

The problem is that I don't know how to configure MAMP for development in my local machine and then push to heroku.

Connecting to your PostgreSQL database without a password is considered insecure.
If you want to do it anyway, please set "PG4WP_INSECURE" to true in your "db.php" file.

  • If I change PG4WP_INSECURE for true appears the follow error:

Error establishing a database connection

Can’t select database

We were able to connect to the database server (which means your username and password is okay) but not able to select the database.

Are you sure it exists?
Does the user have permission to use the database?
On some systems the name of your database is prefixed with your username, so it would be like username_. Could that be the problem?
If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

  • How can i configure it?

I run $ heroku congif

DATABASE_URL => [database type]://[username]:[password]@[host]:[port]/[database name]
SHARED_DATABASE_URL => [database type]://[username]:[password]@[host]:[port]/[database name]

Ok, but... how put this data in "wp-config.php"??

Thank you very much!

Regards.

Alberto.

Stupid question. How do I install plugins / themes?

Hi,

I tried to update the askimet plugin and it just sat there doing nothing.

What best approach to do so? put them in the repo and then push? OR run it locally to update the plugin and then push?

Regards

Mark

Saving to the database kills the process

When I post a new entry or update an existing one the application stops responding. The logs say:

2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST rockgeni.us/wp-cron.php dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> HEAD rockgenius.herokuapp.com/wp-content/uploads/2010/07/kezee.jpeg dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> HEAD rockgenius.herokuapp.com/wp-content/uploads/2010/07/protest.jpg dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> HEAD rockgenius.herokuapp.com/wp-content/uploads/2010/07/kezee.jpeg dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> HEAD rockgenius.herokuapp.com/wp-content/uploads/2010/07/kezee.jpeg dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> HEAD rockgenius.herokuapp.com/wp-content/uploads/2010/07/protest.jpg dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> GET rockgeni.us/wp-admin/admin-ajax.php dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> GET rockgeni.us/wp-admin/options-general.php dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> GET rockgeni.us/favicon.ico dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[router]: Error H13 (Connection closed without response) -> GET rockgeni.us/ dyno=web.1 queue= wait= service= status=503 bytes=
2012-01-04T00:41:00+00:00 heroku[web.1]: Process exited
2012-01-04T00:41:04+00:00 heroku[web.1]: Starting process with command `sh boot.sh`
2012-01-04T00:41:04+00:00 app[web.1]: Launching apache
2012-01-04T00:41:05+00:00 heroku[web.1]: State changed from starting to up
2012-01-04T00:41:05+00:00 app[web.1]: [Wed Jan 04 00:41:04 2012] [notice] Apache/2.2.19 (Unix) PHP/5.3.6 configured -- resuming normal operations

Trouble with MAMP and mySQL

Using 6dab036, trying to get it to run locally in MAMP 2.1.1 on Mac OS X 10.8.3. It can't connect to the database. I have another installation of WordPress locally that can connect to the database without problem, so I know its not the database.

I set DATABASE_URL in the $MAMP_HOME/Library/bin/envvars

DATABASE_URL="mysql://root:root@localhost:8889/xyz"
export DATABASE_URL

Instead I get:

Can’t select database
We were able to connect to the database server (which means your username and password is okay) but not able to select the xyz database.

Are you sure it exists?
Does the user root have permission to use the xyz database?
On some systems the name of your database is prefixed with your username, so it would be like username_xyz. Could that be the problem?
If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

Sliders

Hi everyone! I tried to use "Revolution Sliders" and "Royal Slider", but it does not crete sliders. After a search, I found it is possible that my database user has no privileges to "CREATE TABLE". I used postgress admin and check... and the user has all privileges... Any clue what is happening? What can I do?

Thanks!

Can't use wordpress-importer

The file is uploaded to s3 but is unable to be retrieved from there, looks like a hook is needed for the appropriate file call but i haven't figured out how to make it work

Make the wordpress config instructions a little clearer

Hey just giving this a go, looks fantastic and could be just what we need!

Im looking at the wp-config file and it's just not fully clear where to put the output of 'heroku config'.
A little more instruction here in the README would be much appreciated.

Thanks for doing this project, it's very cool!

Cheers

@evolve2k

I can't select the database on and off.

"Can’t select database
We were able to connect to the database server (which means your username and password is okay) but not able to select the d1p9br869imcr6 database.

Are you sure it exists?
Does the user lvwhjnwhmrwzln have permission to use the d1p9br869imcr6 database?
On some systems the name of your database is prefixed with your username, so it would be like username_d1p9br869imcr6. Could that be the problem?
If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums."

Also get the "Error establishing a database connection" error.

I've uninstalled and installed it again 3 times...

Problems setting up Local Environment on Linux

I have spent several hours trying to get apache, wordpress, pg4wp, and postgresql to get along, to no avail.
I am currently getting this output when accessing localhost

Your PHP installation appears to be missing the PostgreSQL extension which is required by WordPress with PG4WP.

I installed LAMP on Ubuntu using the document way of doing so, I am using the default config for apache

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

I even wrote a little script to move everything from my git repo to the www folder and make sure it has all the right permissions

#! /bin/sh
cp -r * /var/www
chmod a+rwx -R /var/www

I also followed the directions here, putting a SetEnv into apache2.conf, modifying the config file, and setting up the data base as instructed. If I did something wrong, I would ask that you modify the instruction page.

"Can’t select database" error when attempting local install on OSX Yosemite

My remote config works fine on Heroku, but I can't get Wordpress to recognize my local postgres db. I followed the instructions here step by step, but still no dice:
https://github.com/mhoofman/wordpress-heroku/wiki/Setting-Up-a-Local-Environment-on-Mac-OS-X

Below are screenshots to clarify what I've done on my end. I have not touched the wp-config files, which seems like a problem, but since it's not mentioned in the OSX local install instructions I left it as-is.

Any help much appreciated!

Unable to select database error:
http://i.gyazo.com/12169c260615bdff26c45d9c0ec7058f.png

Database 'wordpress' does exist, user 'wordpress' exists with all privileges:
http://i.gyazo.com/74db34e00da6758044434dc77fe3b6ed.png

envars file includes export for 'wordpress' database
http://i.gyazo.com/7599bb363b7156dde1260cda904d13a1.png

MAMP apache server is running
http://i.gyazo.com/773099b7bcaa87182d866e48163c38d5.png

MAMP points to my doc root (I changed this from the default /htdocs location):
http://i.gyazo.com/94920ee0b106a12a180c432351dcb8b9.png

Can’t select database

I cloned the project, followed the configuration and pushed it to heroku, but when I try to access wp-admin it tells me that it can access the server ("which means your username and password is okay") but it cannot select the database. Is there something that I need to do to get it to work?

Plugin installation: Missing zlib extensions

Hi,

When I try to install a plugin on the heroku instance, I get the following error (example with Syntax Highlighter):

Installing Plugin: Crayon Syntax Highlighter 1.9.5
Downloading install package from http://downloads.wordpress.org/plugin/crayon-syntax-highlighter.zip…

Unpacking the package…

Abort class-pclzip.php : Missing zlib extensions

Do we have to do something special to install pugins remotely, or do we have to install plugins locally and then push it to heroku?

Enabling WP_ALLOW_MULTISITE

Hi everyone, I've got an instance of wordpress-heroku running successfully, and things are looking good.

We'd like to add a couple more sites, but would prefer to use Wordpress Multisite rather than deploy multiple heroku dynos.

Has anyone managed to get a network running with this?

I'm trying to get it running locally in the first instance, following this article http://www.andrewgertig.com/2013/05/set-up-wordpress-on-heroku

And also following the normal instructions for a subdomain instance, settings below and also changed the .htaccess (DOMAIN_CURRENT_SITE is localhost, and the app is running on http://localhost/):

The install screen works, the DB tables get setup and I get an email confirming the site was setup, but then when accessing http://localhost/wp-admin/ or http://localhost I just get "Error establishing a database connection"

Any help appreciated.

settings

define('WP_ALLOW_MULTISITE', true );
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', getenv('DOMAIN_CURRENT_SITE'));
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('WP_ALLOW_REPAIR', true);

.htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([0-9a-zA-Z-]+/)?(wp-(content|admin|includes).) $2 [L]
RewriteRule ^([0-9a-zA-Z-]+/)?(..php)$ $2 [L]
RewriteRule . index.php [L]

Theme options won't save

I have followed the instructions to setup my wordpress site at heroku and it just worked fine! Thank you very much for the instructions!!

I have already copied my theme and plugins's files and I could activate them in my heroku's wordpress site.

I started to configure my theme options settings in the site deployed at heroku, but despite of the msg saying "Options Saved", I can see no effects in my site. After looking my settings, I can see they were not saved.

What am I doing wrong?

Tks

web.config

Looks like the web.config file gets overwritten after a while on Heroku. Is this a bug or by design?

How to set up WP and Site address URLs? Crashes app

How does one set the URLs so that when one goes to my blog site url, http://blog.easynda.com, the url does not switch to enda-blog.herokuapp.com ?

Following your instructions, I set the sub-domain in Heroku and pointed it to the app in my hosting provider then used the WordPress Admin Dashboard, go to Settings --> General and changed both urls to match app.easynda.com. This causes the WP instance to log me out and I cannot log back in.

Changing both the WordPress Address (URL) and Site Address (URL) will cause the app to restart logging you out. You will not be able to log back in. The only way I found to recover is deleting the Heroku app and re-creating it. (Tried using a function to force reset of the URLs back to app.herokuapp.com as well as hard-coding into wp-config per http://http://codex.wordpress.org/Changing_The_Site_URL - neither worked.)

If I change on the the SITE URL, the instance does not crash; however, enda-blog.herokuapp.com remains the displayed URL as one navigates.

What's the trick to setting the URLs correctly so the heroku app URL is replaced with the domain URL?

Application Error on new clean installs

I'm receiving an application error on new installs following the read me.MD.

I've been using this repository for months and since the new db update fix you pushed I haven't been able to push new word press installs for my domains.

If you could look into it that would be great

Can't do initial push to heroku

After going through the setup steps, pushing to heroku doesn't work. This actually came to my attention because my existing wordpress app stopped working (couldn't push). So I tried checking out this repo and doing a vanilla setup, and I'm still having the following error:

>>> git push heroku production:master
Initializing repository, done.
Counting objects: 5078, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2628/2628), done.
Writing objects: 100% (5078/5078), 15.01 MiB | 670.00 KiB/s, done.
Total 5078 (delta 2364), reused 5078 (delta 2364)

-----> PHP app detected
-----> Bundling mcrypt version 2.5.8
-----> Bundling Apache version 2.2.25
-----> Bundling PHP version 5.3.27
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for PHP   -> web

-----> Compressing... done, 29.7MB
-----> Launching... 
 !     Push rejected, Invalid add-on specification. Buildpacks must inform addons as a string.

To [email protected]:cherry-crumble-4896.git
 ! [remote rejected] production -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:cherry-crumble-4896.git'

I've logged a support ticket with heroku, as I'm guessing they might have changed something to cause things to break all of the sudden.

Enable CORS

Hi.

How can i use on my .htacces the mod_headers? I'm trying enable CORS to acces my blog from AngularJS app using JSON API plugin, but this need to set Access Control Allow Origin.

When i put it on .htacces server return 500 error.

    <ifModule mod_headers.c>
          Header set Access-Control-Allow-Origin "*"
    </ifModule>

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.