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 13 years, 8 months ago by amin007.
-
AuthorPosts
-
June 5, 2010 at 12:51 pm #1318epeoplesMember
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.
Thanks!
Eric
June 5, 2010 at 2:43 pm #21359amin007ParticipantIf 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
wp_wp_eStore_tbl
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:
yourprefix_wp_eStore_tbl
It should not look like the following:
yourprefix_eStore_tbl
June 5, 2010 at 2:54 pm #21360epeoplesMemberThat’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.
-ep
June 5, 2010 at 3:14 pm #21361epeoplesMemberOops!
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.
http://www.epicimagesonline.com/shop/prints-for-sale/
What am I forgetting?
-ep
June 5, 2010 at 3:35 pm #21362epeoplesMemberNevermind! 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…
‘[wp_eStore:product_id:1:end]’
…had been changed to
‘[MyNewPrefix_eStore:product_id:1:end]’
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!
-ep
March 15, 2011 at 3:39 am #21363estore2011MemberI 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 #21364amin007ParticipantI have answered your question here:
https://support.tipsandtricks-hq.com/forums/topic/add-product-does-not-work
-
AuthorPosts
- You must be logged in to reply to this topic.