Problem: WordPress shows Installation page after migration of MySQL database from
Windows to Linux Server
Cause: After migrating a MySQL WordPress database from Windows server to Linux server,
case-sensitivity of MySQL table names was encountered.
Do note the uppercase letters in the illustration below.
Let the table prefix in
wp-config.php file be:
$table_prefix = 'a5hGtMn5u_';
Unix server is case-sensitive, whereas Windows server isn’t, and all tables will be created with
lowercase letters by default. So when the database was imported to Linux, it automatically created
all tables with names in lowercases.As a result, the website showed the WordPress installation page,
as it was unable to find tables with
a5hGtMn5u_ (Uppercase) prefix in it.
A quick solution is to change the value of
$table_prefix defined in
lowercases, thus matching the table names in MySQL database.
Second solution is to set the
lower_case_table_names mysql variable, as detailed in the following steps.
Note that this requires a
MySQL server restart.
lower_case_table_names=1 on both servers.
Note: When you use SHOW TABLES or SHOW DATABASES, you can’t see the names in their original lettercase.
lower_case_table_names=0 on Unix and
lower_case_table_names=2 on Windows to preserve the lettercase of database and table names.
Note: Ensure that SQL statements always refer to database and table names with the correct letter case
on Windows. Accessing MyISAM table names using different cases for letters can result in Index
corruption; besides, those SQL statements won’t function in Unix, as Unix is case-sensitive.
Note: If you are using InnoDB tables, you require to set
1 on all platforms to force names to get converted to lowercases.