You will need to update the URL of the moved images with a tools such as this: https://ww.wp.xz.cn/plugins/better-search-replace/
You are talking about URL, i’m talking about PATH, the path on the server. I move from a local windows pc so the path is like C:\laragon\www\xxxxx in linux it coul be /var/www/html …
I’m not talking about the url, i already changed the url that is why the website is available. Now i have a plugin that should compress image (WP-Optimize) that try to load media with the old path so have an error (Could not find file for image: blog_id=1, ID=817, file=C:\laragon\www\xxxxxxxwp-content/). i already use
Better Search Replace plugin but it look like it do not work.
Just to clarify you are still using the same “Uploads” directory for your media?
Can you add the following to your wp-config.php
define(‘WP_HOME’,’http://yourwebsite.com/’); define(‘WP_SITEURL’,’http://yourwebsite/’);
yes i use the same “Uploads” directory for your media. My wp-config.php already had those lines and i can manage medias without any issue, it is only with your plugin. How do your plugin retrieve the absolute path?
I am just tagging in one of developers to assist.
@vupdraft thanks, hope we could have a feedback soon
@ludomania007 Which plugin did you used to move the site? If you have used UpdraftPlus, it will take care of both URLs and PATHs
Do you have backup of the site in the old server?
WP Optimize only uses path that are present in the database entries. It will not construct paths or modify it. When you upload a image, it is path will be stored in database by WordPress core itself. WP Optimize’s image compression only uses those entries.
You are saying that it is only WP Optimize has errors. How can WPO aware of path like C:\laragon\www\xxxxxxxwp-content/ if it is not in database?
ok @webulous please which tables should I look to see those entries ?
@ludomania007 Most _posts and _postmeta However the entries can be in any table. For example, WooCommerce category image is in termsmeta and a users profile picture can be in usermeta etc
So, if you have a backup, I would recommenced doing a proper migration.