Do you have SSH and/or SFTP access to site 2?
If so, you can try manually overriding the home url and site url settings in your wp-config.php by defining the constants WP_SITEURL and WP_HOME.
define( 'WP_SITEURL', 'http://agoraonline.ca' );
define( 'WP_HOME', 'http://agoraonline.ca' );
Then you should be able to access your wp-admin again so you can change those values back to what they should be under general settings.
http://codex.ww.wp.xz.cn/Editing_wp-config.php#WordPress_address_.28URL.29
Thanks a lot! It’s not fixed. I’m not sure if I made things worse but I definitely did something different (excuse me for my ignorance; I’m better at front-end and CSS stuff, so editing .php files is new to me).
This is what I did and what happened:
Using the instructions on the WordPress Help page you linked to, I opened the file <wp-config-sample.php> using TextEdit. I followed the instructions on the Help page and did the following things: I edited the database information which I got from cPanel via my web host (which I have every reason to believe I did correctly but it’s entirely plausible that I didn’t), then I added the security keys using the random generator recommended by that WordPress help page. Lastly, I added in the WP_SITEURL and WP_HOME constants exactly as you worded them (I’m not sure if the location of these constants in the .php file makes a difference, but just in case, I added them underneath the security keys). The last thing I did was I saved the .php file and then renamed it to <wp-config.php>.
Thinking I did everything correctly, I tried to login again to the wp-admin for my wp.org website and I get an otherwise blank page with the following text displayed on my web browser: “Error establishing a database connection” – which I didn’t get before.
Any help for what I should do now? I was really hoping to get this website launched by the end of this weekend because I spent all summer building it, and now I’m worried it’s completely disappeared, haha.
It sounds like you have replaced your original working wp-config.php with the contents of wp-config-sample.php, which has messed up the database connection.
It might be best to contact your host to have them assist you with restoring your DB connection. Ask them what your database name, database user, database password, and database host should be set to, and set those constants appropriately in wp-config.php.
Your host * might * even have a nightly backup from before you overwrote wp-config.php that they can restore. Some hosts do that for free, some do it for a small fee.
Thanks. I sent a support email to my host. I’ll keep you posted if I need further help.
Much appreciated!