Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Generate New DB Table Prefix" bug #103

Merged
merged 1 commit into from
Sep 20, 2020
Merged

Conversation

baddiedev
Copy link
Contributor

Problem:
If the old DB table prefix happens to also exist elsewhere in the $table_prefix line in wp-config.php then after the change is executed, all pageloads break with "Configuration Error - Your wp-config.php file has an empty database table prefix, which is not supported." because $table_prefix has been renamed.

eg: Changing the DB table prefix from "le_" to "foo_" means $table_prefix="le_" becomes $tabfoo_prefix="foo_"

Solution:
Split line at "=" and only apply change to last part instead of whole line

Problem:
If the old DB table prefix happens to also exist elsewhere in the $table_prefix line in wp-config.php then after the change is executed, all pageloads break with "Configuration Error - Your wp-config.php file has an empty database table prefix, which is not supported." because $table_prefix has been renamed.

eg: Changing the DB table prefix from "le_" to "foo_"  means `$table_prefix="le_"` becomes `$tabfoo_prefix="foo_"`

Solution:
Split line at "=" and only apply change to last part instead of whole line
@Arsenal21 Arsenal21 merged commit 50322eb into Arsenal21:master Sep 20, 2020
@Arsenal21
Copy link
Owner

Thank you. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants