Skip to content
This repository has been archived by the owner on Mar 11, 2018. It is now read-only.

Latest Working Set up work around. #134

Open
crisamdegracia opened this issue Jan 5, 2018 · 1 comment
Open

Latest Working Set up work around. #134

crisamdegracia opened this issue Jan 5, 2018 · 1 comment

Comments

@crisamdegracia
Copy link

Working Steps ..

@crisamdegracia
Copy link
Author

see it live >> http://pedrolifeandweb.herokuapp.com/

step 1: git clone it

step 2: cd to its directory

step 3: create your own branch and cd to your branch

step 4: heroku login then heroku create

step 5: here's a tricky part. you must change the name of the url that heroku has given you like this (hamlet-adobo-2323.herokuapp.com) to your desired name. like (awesomeSite.herokuapp.com before you git push heroku origin - if not. you will having error if you wish to change it in the future. this issue is just i cant solve with its remote breaking.. maybe you can but what i am telling you now is the easy part. so here we go.

heroku apps:rename -a [previousname] [newname]
example:
heroku apps:rename -a hamlet-adobo-2323 awesomeSite

then voila you have a nice name on your site url there.

step 6: update your remote (just notice where did i get those naming from the start okay?)

heroku git:remote --app awesomeSite

step 7: Create a database

heroku addons:create heroku-postgresql

after creating ... from the next original instruction of mhoofman which the pg:promote.. it didnt work i for me if you have unverified heroku account or no installed postgresql on your machine.. so this is the trick

open wp-config.php

$db = parse_url($_ENV["DATABASE-URL"]);

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', trim($db["dbname"],"/"));

/** MySQL database username */
define('DB_USER', $db["dbuser"]);

/** MySQL database password */
define('DB_PASSWORD', $db["pass"]);

/** MySQL hostname */
define('DB_HOST', $db["host"]);

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

look for those . then goto your heroku account, look for the postgresql setting
look for the values there to fill on those codes above .. like this below ..

for the environment variable look for your main setting (not postgres) theres a URL there just like below..

$db = parse_url($_ENV["postgres://mit123231lqspkb:ea1858easd12312d515cd48a33e0671a587f8a50634d0bd58f@ec2-54-227-250-33.compute-1.amazonaws.com:5432/d8asd23219r"]);

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', trim($db["d87tnfm9ck9n9r"],"/"));

/** MySQL database username */
define('DB_USER', $db["asdhjkashjsd"]);

/** MySQL database password */
define('DB_PASSWORD', $db["e2j3hkh12hkjhkj1h23123jkh23hkj3hjkh"]);

/** MySQL hostname */
define('DB_HOST', $db["ec2-54-227-250-33.compute-1.amazonaws.com:4586"]);
(LOOKCAREFULLY HERE.. its a host value and a port value ..)

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

step 8. git add . (add everything to git)

step 9: we add everything to heroku.

git push heroku master

step 10: visit your awesomeSite.herokuapp.com << then name the wordpress , leave the fields blank just put a site title, password auto regen.

STEP 11 : DO NOT UPDATE ANYTHING inside heroku wordpress itself .. it will break your site.. you can only update plugin and installed themes (im not sure if they all work) from your local file then push it to heroku .. the themes that initially created by default will only work. i hope this helps!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant