How to update new URL on WP-Table Reloaded dump file without invalidating it
I recently moved my WordPress site from my Mac OS X to Windows XP and before my site URL was http://localhost:8888 on Mac and now is just http://localhost.
After 开发者_运维技巧exporting the WP-Table Reloaded dump file from plugin options from my Mac, I viewed the dump file and noticed that it had the path http://localhost:8888, which is not correct as it now in Windows cannot find my images within the table cells.
What is the best way to get the new path of just http://localhost reflected within the WP-Table Reloaded dump file as unfortunately editing the file manually causes the file to be invalid during an import?
For wp-Table reloaded plugin , there is [Import/Export Formats][1]
But there is another way , dump your whole db of the project and follow the quick tip
Quick tip
before dumping sql to new database,
open sql file in any text editor and use find and replace tool.
replace http://localhost:8888 to http://localhost
and then dump into your new db.
after this you dont need to edit any php file or database table
it works.
note: you can do this also for absolute path but its not required many times (/var/www/... to c:\xampp\htdocs...) something like that but path varies as per your system.
Check some useful links
- How to Move WordPress Blog to New Domain or Location
- How to move WordPress site to another server with zero downtime
- A Guide for Moving One WordPress Site to Another
Thanks to JapanPro for your responses.
Apparently writing to Tobias, who developed the WP-Table Reloaded plugin, he wrote back with the following information regarding my issue:
Hi,
you mean that you have that URL as part of the cell content, e.g. in HTML for links and images?
Then, yes you are correct, you must not change or edit the Dump File as that will corrupt the file.
Your only chance is to manually edit the wrong URLs in your tables or to export each one as a CSV file, edit that CSV file (which will not get invalid by that) and then re-import the CSV file. I know, this procedure s*cks and is a lot of work, but unfortunately I don't see a way around it :-( It is a result of the data structure I chose for the storing of the tables, when I first developed the plugin. This problem is one of the drawbacks of that data structure, but unfortunately I also only learned about it when it was too late...
Best wishes, Tobias
Question Solved.
精彩评论