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

WordPress custom table prefix doesn't work #10

Closed
G3n3 opened this issue Oct 17, 2014 · 2 comments
Closed

WordPress custom table prefix doesn't work #10

G3n3 opened this issue Oct 17, 2014 · 2 comments

Comments

@G3n3
Copy link

G3n3 commented Oct 17, 2014

Adding a custom prefix to the connection params does not override the prefix used to lookup tables. The wp_ prefix is hardcoded in corcel.

i.e.

$params = array(
'database' => DB_NAME,
'username' => DB_USER,
'password' => DB_PASSWORD,
'host' => DB_HOST,
'prefix' => 'abc_'
);

Will generate PDO exceptions like: 'mydb.abc_wp_postmeta' doesn't exist' in ...

Should perhaps be looking for "abc_postmeta" and not "abc_wp_postmeta" for example.

@danilaplee
Copy link

you can change the prefix thing, but it'll take a few minutes of looking up all those prefixes in all those files, if you need it for security do it, if not it'll be easier to change them in phpmyadmin to wp_

@G3n3
Copy link
Author

G3n3 commented Oct 17, 2014

Yeah easy fix. Just thought i'd log it in case you wanted to change the default behavior.

Thanks.

@G3n3 G3n3 closed this as completed Oct 17, 2014
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

No branches or pull requests

2 participants