• Resolved newfoundmel

    (@newfoundmel)


    I recently had to migrate a site from one server to another via FTP/phpMyAdmin and most of it is working except I can’t see any options in the admin bar and, after logging in with an administrator account, when I try to visit /wp-admin/ it just redirects me to the home page. I thi this is being caused by Ultimate Member – is there any way I can turn off these redirects via FTP or phpMyAdmin?

    Also, I have no access to the backend of the first site to uninstall UM before migrating.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @newfoundmel

    Sorry for the late response.

    How did you migrate the site? Did you export the SQL dump from the first site via PHPMyadmin and then import it to the new server/site via PHPmyAdmin?

    Could you please try adding the following code snippet to the theme/child-theme’s functions.php file?

    add_filter("um_access_enable_referer","__return_true");

    Once the code is added, visit the WP Admin. When you are redirected to homepage, It should have the “ref” parameter in the URL. Let me know what’s the ref ID.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @newfoundmel

    ..Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter newfoundmel

    (@newfoundmel)

    I tried adding that code to my child theme’s functions.php but it doesn’t seem to have done anything. I still get redirected to the home page with no parameters in the URL.

    I lost browser access to the site because a security certificate expired on the server and we’re not able to renew it. So I have server access, but not browser. I zipped all the site files and copied them to the new server. I used phpMyAdmin to export the .SQL. It’s changing domains so I did a search and replace in Sublime to change the URLs in the .sql file and then I imported on the new server via phpMyAdmin.

    • This reply was modified 2 years, 10 months ago by newfoundmel.
    Thread Starter newfoundmel

    (@newfoundmel)

    FYI: When I rename the ultimate-member folder in plugins, I get a “Sorry, you are not allowed to access this page.” error when I try to visit /wp-admin/. When the plugin is named properly it just redirects me back to the home page with no error, insteading letting me into the back end. I’m logged with an administrator account.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @newfoundmel

    I think the problem is when you do a search-and-replace with the sublime. You need to use a plugin to do the search-and-replace because there are serialized data that requires deserialization before you can change the URLs. But since you don’t have access to the browser side, please import the SQL file without editing the URLs and then install WP CLI on your server and then run this command:
    wp search-replace 'https://oldsitedomain.com' 'https://newsitedomain.com'

    Search/replace intelligently handles PHP serialized data, and does not change primary key values.: https://developer.www.ads-software.com/cli/commands/search-replace/

    Regards,

    Thread Starter newfoundmel

    (@newfoundmel)

    If I don’t have access to cPanel on the destination hosting account, could I run this on the original server and then export via phpMyAdmin? Would that work?

    Thread Starter newfoundmel

    (@newfoundmel)

    It worked! I did it on my original server (site wasn’t visible anyway so no odds if I changed the db) and then exported it. Imported to the new server and it worked like a charm. Thanks.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @newfoundmel

    Thanks for letting us know how you’ve resolved the issue.

    Regards,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘No access to wp-admin (redirects to home)’ is closed to new replies.