• Resolved jatraddatz

    (@jatraddatz)


    Hi I am new to wordpress
    I migrate a local version of the website running Local by Flywheel by doing a backup, download the backup to my pc from the local site.
    I then logon to wp-admin page of the public site. I upload the backup just created
    then restore the backup. The site works normally & I can logon to the wp-admin and administer the site normally.
    The problem is that if I take a backup of the production site & restore it to the local site and then try to logon to wp-admin I get
    Sorry, you are not allowed to access this page.

    I have to rebuild a new local site from a local site backup.
    Is this expected behaviour or have I missed something?
    Thank you in advance

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support tonyrobins

    (@tonyrobins)

    Hi @jatraddatz

    Please make sure that the prefixes for your database’s tables match the prefix in your wp-config.php file, if they don’t, then you’ll need to edit it so that they do.

    Here’s a guide(skip to #6 solution) you can follow.

    If they match each other. Then please try to remember and revert your changes you’ve made before you create the backup. You can follow this guide (skip to Revert Your Changes part).

    We hope this helps. And please keep us posted on any further updates.

    Regards,

    • This reply was modified 5 years, 1 month ago by tonyrobins.
    • This reply was modified 5 years, 1 month ago by tonyrobins.
    Thread Starter jatraddatz

    (@jatraddatz)

    Thank you for your help.

    Production WP_config.php $table_prefix = ‘wpcp_’;
    local by Flywheel wp-config.php $table_prefix = ‘wp_’;$table_prefix = ‘wpcp_’;

    I only used WPvivid to backup the complete site then used WPvivid to upload the backup & restore the site. Prod site had WordPress installed the WPvivid before doing the restore.

    curious as to how it work dev => prod but not prod => dev

    I will try it out soon

    Thread Starter jatraddatz

    (@jatraddatz)

    I don’t know how to access the site data bases etc if I cannot logon to wp-admin.
    I have used an alternate method. The production website is static. I exported Posts & pages from the prod and imported them into the Flywheel site.
    This has worked for me.

    Thread Starter jatraddatz

    (@jatraddatz)

    using wpvivid plugin

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @jatraddatz

    Thanks for the update.

    Since you’re unable to access your WordPress dashboard, you’ll need to manually access your site and check the prefix in your wp-config.php file using a FTP client. Then log in to phpMyAdmin and look at the prefixes for your database’s tables.

    The guide I showed you covers the details on how to do this.

    “Sorry, you are not allowed to access this page” is a common error in WordPress that can occur when you make changes to your WordPress site or trying to use it. It has many possible causes. However, when it occurs after the website migration, the most possible causes would be “incorrect database prefix” and “changes you’ve made before you create the backup” as I mentioned in my first post.

    Anyway, glad that you’ve found another way and ultimately made it.

    • This reply was modified 5 years, 1 month ago by tonyrobins.
    Thread Starter jatraddatz

    (@jatraddatz)

    Hi Tony,
    Thank you for your advice. The problem is you are not understanding the main point or I have not explained myself properly.
    I came across the WPVIVID pluggin in the WP_Crafter YouTube channel a few months ago.
    Adam demonstrated using the plugin to move a WP site from environment to environment without having to edit any prefixes or starting PHP. His recommended local environment is Local by Flywheel.
    When I copy my local site to production it works well. Site just comes up. I can logon to WP_admin and get to the dashboard. Yay Yay great.
    When I copy the prod site to my local site the site works ie you can use it as a customer.
    If you try to access WP-admin then you get the “you are not allowed to access this page”
    It makes the plugin substandard, almost unusable. Apparently given the the words of WP-Crafter review it likely worked in a previous version 5 or 6 months ago. It seemed to have an option to change the DB prefixes automatically.
    The import/export trick only works with static websites. If the website was capturing emails or was a membership site, the plugin would be unusable.
    So maybe this is a feature request instead of a bug report.
    Thank you for the plugin. What it does correctly it does well.

    Plugin Support tonyrobins

    (@tonyrobins)

    Hi @jatraddatz

    Thanks for the clarification.

    The process of replacing the database table prefix was originally done by our plugin, but it did not take effect in your environment.

    Both “loacl to prod” and “prod to local” are actually the same behavior. Since “local to prod” works fine in your situation, which suggests the algorithm of the plugin has no issue.

    So why did “prod to local” fail? Our guess is that this could be relate to the local by flywheel environment. We have done “prod to local” at least a few hundred times with other local environments. All has no issues.

    If you could provide us a download link of the backup(please send it to support(at)wpvivid.com), we can perform a test on our side.

    Thank you and look forward to your update!

    • This reply was modified 5 years, 1 month ago by tonyrobins.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘after copy prod site to local site cannot logon to wp-admin’ is closed to new replies.