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.
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)
4. under meta_key column find this section
double click RAnD0m_CAPABILITIES so you can edit it
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
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
scroll down and find another user with the other mixed upercase/lowecase RaNd0m_capabilities
you can also use FIND and search for _capabilities
example:
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
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++)
This will fix all the errors in the database
Save the file
Go back to PHPMyAdmin
Click DATABASE at the top
scroll down to very bottom
click Check all tick box
from down menu chose drop
Click Yes to confirm you want to DROP tables
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
You will then see a confirmation like this:
This will of then fixed your issue.