you will need to open your backup .sql file in notepad and do a search -> replace on localhost url to hosted url as image url’s get hard-coded in the db
is it the only way to do that with wordpress ??
there is not way to store in the database relative paths ?
then it is a toy not a serious CMS
thanks but I cant believe there is no other ways , no pro users will do that
this can help someone, if you see any table and/or and field missing in the replacement please tell me
DELIMITER //
CREATE PROCEDURE sp_replace_DL ()
BEGIN
SET @l= 'http://localhost:8888/website';
SET @d= 'http://website.com';
UPDATE wp_options wo SET wo.option_value = REPLACE ( wo.option_value , @d, @l);
UPDATE wp_postmeta wm SET wm.meta_value = REPLACE ( wm.meta_value , @d, @l);
UPDATE wp_posts wp SET wp.post_content = REPLACE ( wp.post_content , @d, @l) , wp.guid = REPLACE ( wp.guid , @d, @l), wp.post_content_filtered= REPLACE ( wp.post_content_filtered , @d, @l) ;
UPDATE wp_usermeta wum SET wum.meta_value = REPLACE ( wum.meta_value , @d, @l);
SET @lh= '/www/website';
SET @dh= '/home/website/public_html/';
UPDATE wp_options wo SET wo.option_value = REPLACE ( wo.option_value , @dh, @lh);
UPDATE wp_postmeta wm SET wm.meta_value = REPLACE ( wm.meta_value , @dh, @lh);
UPDATE wp_usermeta wum SET wum.meta_value = REPLACE ( wum.meta_value , @dh, @lh);
END //
DELIMITER ;
-- CALL sp_replace_DL()