Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8474185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:33:35+00:00 2026-06-10T17:33:35+00:00

Has anyone successfully configured a WordPress app using the Heroku Postgres add-on? I’ve inherited

  • 0

Has anyone successfully configured a WordPress app using the Heroku Postgres add-on? I’ve inherited a WordPress app that’s currently running on Heroku, but not using the Heroku Postgres add-on.

I’m trying to create a staging instance of the app and keep receiving, “Error establishing a database connection”.

I’m using the PG4WP plugin and spawned a heroku-postgresql:dev instance.

My DATABASE_URL config var is of the following format:

postgres://xxxxxx:yyyyyy@zzzzzzz.compute-1.amazonaws.com:5432/xxxxxxxxx

My wp-config is below:

if (isset($_SERVER["DATABASE_URL"])) {
  $db = parse_url($_SERVER["DATABASE_URL"]);
  define("DB_NAME", trim($db["path"],"/"));
  define("DB_USER", $db["user"]);
  define("DB_PASSWORD", $db["pass"]);
  define("DB_HOST", $db["host"]);
}
else {
  die("Your heroku DATABASE_URL does not appear to be correctly specified.");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:33:36+00:00Added an answer on June 10, 2026 at 5:33 pm

    The wordpress-heroku fork of WordPress solved my problem.

    It worked out-of-the-box and if you are planning to use WordPress on Heroku, I would definitely recommend it.

    Unfortunately, I still don’t know what I was doing incorrectly the first time around.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone successfully tried minifying AND concatenating all the jqGrid locale files so that
Has anyone using .net actually worked out how to successfully sign a signature to
Has anyone successfully configured WebSphere Commerce Developer 6.0 to use WAS 6.1 and RAD
Has anyone successfully gotten swfaddress to work with IE8 and above? It seems that
Has anyone successfully created a NetBeans project that combines Clojure and Java source? I
Has anyone successfully gotten IronPython running without issues in a web environment? I am
Has anyone successfully tried using Microphone.getEnhancedMicrophone() method in Adobe Flash CS5? I tried all
Has anyone successfully implemented a Java based solution that uses Microsoft SQL Server 2005
has anyone successfully compiled a pro*fortran program on windows that connects to Oracle 10g?
Has anyone ever successfully configured Maven on eclipse to develop android apps? May I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.