There was a problem loading the comments.

WordPress WP-Admin permissions broken after migrating from Windows Hosting

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
If you see error Sorry, you are not allowed to access this page after migrating WordPress from Windows Hosting this is related to mixed characters in the database.
8cf142860486ca3d4ce280dd2291dbfc30eb3cceb8b65fa0996819936df3ae33eade20479a1ac06a?t=aa76ccc09756eba3967ed0bb1382093e

Follow this guide to fix the issue.

1. Login to DirectAdmin, go to Account Manager > MySQL Management and click Login to PHPMyAdmin
2. If you have multiple databases shown on the left, expand the database that is used by WordPress (as shown in wp-config.php)
3. Find the table  RANDOM_usermeta  (RANDOM will be something random)
59fddd8eea3c70c96f8562d1cc8ccce3431d271a8bdf576cceec1044952ba87c70ce256696722543?t=ba3738299c20972f0add9dc597a4e60b

4. under meta_key column find this section
d41c40c3364a7483c5907ee254c119ea4d7c715fe76533ecf7ec1143096d32646640f96849696c56?t=44f9c9a30cb57157992aef1e441ec137

double click RAnD0m_CAPABILITIES so you can edit it

f9b2795a7bec9328f36ec01a6f1c6f0c22da4607dd3bafa6db55ab25d9784e6c152f3c3d7a4a2460?t=f99008caaeda5b1b0c9c97c9b94e3dcf

Replace everything before _ to lowercase.

in my example above i would change  the R and E from uppercase to lowercase, press enter key on your keyboard to save changes.

do this for all of the other fields below it such as user_level etc

Once done it will will like this 

24987e955bf1925cd606a071f1ccdf8d58fc9a907c2925866a441de02fc4dbf7c2ef203387557668?t=7edaef6eb0234222b42dd445afbeb7ce

This will fix the issue for users with just 1 WordPress account.

If this does not fix the issue for you then do the follow.

in PHPMyAdmin at the top of your usermeta table set PHPMyAdmin to load 500 rows

1255d968902dee8fb0290afa15b911136c7e8160dde8e77b5a1afb11981d873dd2c59795ba74caf5?t=da3c8834ba8fbe1235e88f5864d5a7c6

scroll down and find another user with the other mixed upercase/lowecase RaNd0m_capabilities
you can also use FIND and search for _capabilities
example:
d688f6e5cfb439387a9167df1b862ae810c8e14f6cbad0c5d4f05c65e1f7d2fd6934ac1c16daf58d?t=4ba0ad2eae5c7a73b242a63b9fa34d97

Copy the text highlighted above and paste it somewhere safe like notepad/word etc.

Now lets export the database

1. click the text DATABASE at the top
2. Click Export
3. Click GO
This will download the database to your computer
43420e9e443d65bd0a5facafe5584c22fffd91687937a6134ef27b4ecceea0907c6d76b6f5dfdd67?t=bdcefa0cbb26789e2a6b1c5e9ce8f770
Open the database in your notepad/notepad++ (windows) or sublime text (mac) or nano (linux)

use find and replace to replace all the mixed uppercase with lowercase

for example (from notepad++)

7cbba41df196a0976e7e26e69b5ce68a33d65856ffea19054e9966ddc11bf2e6dc2fa56ad5d0d100?t=9b6ac51d5443de814082de333886a91b

This will fix all the errors in the database
Save the file

Go back to PHPMyAdmin
Click DATABASE at the top

5e40e80a086a6c4ab24ad56408e3a644ac39877087f926a1c67343e9ecc383d85ad471e76841165f?t=92c21360b0b7bef613e873c3fcb3459b

scroll down to very bottom
click Check all tick box
from down menu chose drop
3acd423bfddf027cc490b722d61ed0243dae65a4426a24eb4dfeb98d4a5b0a3e1cfd57e2d4aaee0c?t=620e8bf01761cfa200ce80e2f3807356

Click Yes to confirm you want to DROP tables

200f9acd9535133c43a848b915fc993f9fd7912840c540e39a9cc15c2c3e165e5ecdcea2bc089f4e?t=bb898de77fb6c37a2d72b527fa3b0c49

We will now import our fixed database

1. click import
2. click browse and find the file you just modified on your computer
3. uncheck check foreign key checks
4. click GO

6614e979b8709079e45439614d27236340a144c1f82adbfc588bf16a7100c47fe965c346797b95a4?t=457ffc16b745848a71368e9df3932fcc


You will then see a confirmation like this:

bae89ca5ea32e080c861c525ea9b178fafdcb49f311f37bd326795c16619e43585519af407839cf0?t=c20a465329d66b13026da07680466a17

This will of then fixed your issue.

Share via
Did you find this article useful?  

Related Articles

Categories

© The Hosting Heroes