Reviews saving to a new website
Author: Jordy D.
Visited 727,
Followers 1,
Shared 0
I have had the same website for several years now... And I have over 100 positive reviews
I have now made a new template and the website is ready to be uploaded.Can I transfer my existing reviews on my 'old website' to my new website?I copied the old page to my new website but I'm afraid I will lose the reviews?
Created both websites with X5 latest version. (2022.1.7) And I used the review system managed by X5 itself.
I can also view my reviews via mydomain.**/admin/login.php
Who can help me please?
Posted on the
Hi Jordy, I run in the same problems, with the difference that X5 2022.x won't create all tables required for a new database, whatever I tried. I fixed that now manually and it works fine.
Regarding your question, the way to go depends on your setup. If you have only a new webspace, which is connected to the old database or a new webspace together with a new database. In both cases it would be wise to export first all old tables, with the export function of your database admin console (hosting package) in standard format to disk.
Afterwards I would made a full upload of your new website to an empty webspace with X5. In case you have special configured files like .htaccess, Google Tag Manager etc. you could leave them on, but it is better to clean up the other old files first. Because you start from a new template, the database table names will be different now. Test your website and check the number of tables created in the database. For any review object and the blog, you should find a separate table like w5_template number_object ID_comments. In my case 50% where missing, the whole review section and the dynamic_products table. If you are lucky and the tables are there, import one of the saved table backup files and check which of the new tables (correct object ID) fits to it. Save this new table name to clipboard, delete the table and rename the imported table to the new name. Make a test if the comments are there. The same procedure for the other objects.
If none of these tables were created, you have to find out the object numbers either from the html source code of the page or by enabling the php error engine in the hosting package. In the last case you should see something like below, where in bold the missing table name is mentioned:
Fatal error: Uncaught mysqli_sql_exception: Table 'mydomain.w5_v1z94kte_29_36_comments' doesn't exist in /mydomain/res/x5engine.php:6172 Stack trace:.....
Author
Hi Martin
Thank you for your reply. I will look in to it ;).
Shame that X5 doesn't do something about this so it is easy to change from template/website without losing the reviews.
I use the same website and same domainname ect. Only have I made a new template and copied all to the new website (still need to upload it) but I will not risk to lose the reviews.
So I will investigate my webspace where I can find those files.
Author
Hi Martin
I can't find those files? I have like 100 folders on my webspace ... Do you know in what folder I must look/search?
I spend over one hour already but I don't find it ...
thanks
Hi Jordy,
you have to login into your SQL-Database not into your webspace.
You will find the right parameters in the "Export Website to Internet" under Connection/Database or open it directly from your hosting panel under PHP/Database settings.
Hi Jordy,
if you use the same webspace and the same database name (e.g. identical connections settings) with a new template or project file, X5 won't overwrite any existing tables on the sql server. It should normally create new table structures with unique ID names into the database. This feature depends from the X5 version! For example v.16.xx uses global table names, with a chance of overwriting. I don't know under which conditions and under which step during the upload process this will be done. But I guess that sometimes the internal book keeping, which object needs which table, gets out of track and in my case some tables were missing afterwards. Neverthelesss it is important to get an overview of the existing structure, to compare it later on with the newly created ones.
And 100 folders in the webspace? I hope not all from your root directory and you count also the sub/sub folders. If you have concerns to delete the old stuff, you can create a folder like x5backup under the root and move all existing folders under it, before uploading the new version.
Hope that helps you out
If you do this (which is a good idea in case something goes wrong) then remember to keep your "old" project in a zip file, and in the new project you should mark the subfolder not to be crawled.
In 1. settings in SEO you add a line:
Disallow: /yoursubfolder - where yoursubfolder is the name you give the subfolder.
He John, you are totally right and that is a very good hint!
Normally, I leave the backup folders live only during the testing phase and delete it afterwards. I like a clear overview look.