Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › eStore problems after renaming WP database tables
- This topic has 6 replies, 3 voices, and was last updated 12 years ago by amin007.
June 5, 2010 at 12:51 pm #1318
I have a security scanner plug-in on my site that provided a set of instructions on securing my WP installation yesterday, which led me to rename my wp database tables to something other than the prefix “wp_”. Those instructions can be found here…
I’m pretty sure I followed these steps correctly, however, after I finished everything in my site works fine except, 1) my sidebar widgets were gone and, 2) my saved eStore products were gone (see the results here: http://www.epicimagesonline.com/shop/prints-for-sale/ ) I’m easily replacing my widgets now so that is not a concern (and not relevant to you either, but I thought the background might help).
I could not, however, replace my eStore products. I entered a new product with variations, hit save and received a msg indicating the product was saved successfully. I then went to the Manage Products panel to find nothing there. So somehow there seems to be a disconnect between the database eStore is saving to and the one it looks for when I try to display my products.
I did my database name changes using PHPMyAdmin on BlueHost. It’s pretty straight-forward, even for me, a PHP database newb. I took a moment to browse the database tables relating to eStore and found that the newly named tables do contain my original product data. Somehow eStore is just not finding them.
So my question is, is there some area within the eStore source code that needs to be updated with my new database table naming convention? If so, where/how can I do that? Failing that, is this something that can be solved within eStore at all or is there some other admin area with my host that I need to update? Please advise.
EricJune 5, 2010 at 2:43 pm #21359amin007Participant
If you only updated the database prefix then there should be no issue as it gets the database prefix from a variable (it’s not hardcoded).
Here is an example name of a WP eStore’s database table
The first “wp_” bit is the database prefix that it gets from WordPress but the next “wp_” is not (“wp_eStore_tbl” is the name the eStore gives). It’s not the best name!
Anyway, sometime people make a mistake and instead of changing the true database prefix, they change all the occurrences of “wp”. Remember, it’s not a crime to have the word “wp” in a table name.
So, if you renamed the database tables correctly it should look like the following:
It should not look like the following:
yourprefix_eStore_tblJune 5, 2010 at 2:54 pm #21360
That’s it. I noticed that the eStore entries were doubled, where “wp_” was replaced twice but thought nothing of it. I’ll fix those and see how it goes. Hopefully this will save me a ton of re-entry.
Thanks for the fast response! My children will sing songs about you.
-epJune 5, 2010 at 3:14 pm #21361
I changed the table names as you suggested and that seems to have worked. My products now show up in the Manage Products screen as before. But that still hasn’t translated back to my store page for some reason.
What am I forgetting?
-epJune 5, 2010 at 3:35 pm #21362
Nevermind! I found it. The quick code entries in my NextGen Gallery details for each image were also modified when I modified my database tables. So the code…
…had been changed to
All I have to do is change these back to wp_ and I’m good. I already tested this with the first product and it looks good as new. Thanks again for your help. Gotta love plug-in providers who support their work!
-epMarch 15, 2011 at 3:39 am #21363estore2011Member
I just transfer my web site from my local host and estore can not read the products. My database is wp_wp_ and when I go to change the database name through edit it says the database does not exist. How do I repair my tables and rename the database.March 16, 2011 at 1:11 am #21364amin007Participant
I have answered your question here:
- You must be logged in to reply to this topic.