Unable to WP-Admin Login After Site URL / Home URL Update

Hi all,

I received a site that had just a bedrock install on it. I went through and updated the applications.php file to reflect the new site’s domain and push the site live.


I commented out these lines:

define('WP_HOME', env('WP_HOME'));
define('WP_SITEURL', env('WP_SITEURL'));

And added these lines:

define('WP_HOME', '//example.com');
define('WP_SITEURL', '//example.com/wp');

Went from: redirecting constantly, to saying I didn’t have “cookies enabled,” and now it’s not letting any admin passwords login.

I’ve reset paswords, using functions.php, wp_users in phpMyAdmin, and even tried to do the basic password reset. Nothing I do is allowing me to successfully log in.

I’ve also made sure the domains are correct in wp_options and linking up to what’s in applications.php.

Is it possible that it’s a Bedrock issue? The entire site is live and functioning correctly. Just don’t have the ability to log-in to admin portion. Bcrypt? Anything! Much appreciated.


Why are you not putting http or https in your URL?

This was suggested from another on my team. I can try and add those and see if it does anything real quick. Thanks for the tip.

I’m not really sure why he chose not to add those.

EDIT: Same thing happening :stuck_out_tongue:

Ok so this is on a cPanel or something similar yea?
I have some backups here from when we hosted on a panel, I’ll do my best to relay this info to you, and hopefully it’s not too out of date to help:

The public_html (web root) just contained the app folder, index.php, wp folder, config folder and wp-config.php.
wp-config.php is bedrock standard I believe, but our application.php files were changed to what a default wp-config file looks like from wordpress.org, but we replaced the database info section with a require, like: require_once('environment.php');
The environment file just contains all the standard database connection info, then you can ignore it in git or ftp.

These sections may also be important:

 $root_dir = dirname(dirname(__FILE__));
define('CONTENT_DIR', '/app');
define('WP_CONTENT_DIR', $root_dir . CONTENT_DIR);

if (!defined(‘ABSPATH’)) {
define(‘ABSPATH’, $root_dir . ‘/wp/’);

For extra security you could place the config folder above the web root and update your path to it.

I could definitely be missing a step, let me know if that works.

If all else fails, here’s a checklist our team used to transfer to a normal wordpress setup. We would use this to transfer to admins that would split their wig at the site of bedrock. I don’t recommend this of course, but this will get your site working if you’re desperate. Notes are very old and mostly concern Sage themes, and is basically just migration steps, but hey, might help:

  • Download latest wordpress from wordpress.org and extract (this will serve as the base to copy all assets into).
  • Delete all but one default theme from wp-content/themes
  • Run gulp —production on our theme
  • Copy our theme folder into new WP wp-content/themes - then delete:
    • All hidden dot files
    • All .md files
    • assets
    • bower_components
    • node_modules
    • gulpfile.js
    • bower.json
    • composer.json
    • package.json
  • Copy plugins into plugins folder
    • Delete hello.php & akismet.php first
  • Copy mu-plugins folder into wp-content
    • Delete disable indexing.php
  • Customize wp-config.php in root
    • Make sure the database table prefix is correct
    • Generate salts
    • Enter login details
  • Compress our new site (compress from within the folder so assets extract straight to web root)
  • Add new Database in cPanel (MySQL Database Wizard) and note login details
  • Export database through wp-cli
    • Example command: wp search-replace ‘website.dev’ ‘website.com’ --export=live.sql
    • May also have to change https:// prefix from 2 items in options table
    • May also have to search replace app/uploads for wp-content/uploads (older installs)
  • Import DB into cPanel (PHPMyAdmin)
  • Compress existing website (File Manager)
  • Download backup zip (File Manager)
  • Upload new site (File Manager)
    • Set file permissions
  • Delete or move old website out of root (File Manager)
  • Extract new site