WordPress media path

I’ve reinstalled WP and moved everything to different path /dev. Changed site url settings (home, site) in wp-options and refreshed Permalinks as well as added relevant .htaccess subdir.

All is fine apart of media library items. They’re looking to non existing old location.

Read More

Is there any way of updating url for media library items? Is the whole url stored in db or is possible to make an update for main url.

CDN might be a solution but I’d like to keep it on the main server for now.

Thanks,

Related posts

4 comments

  1. I would like to share a plugin link that i personally use to resolve this problem for media url. Here the plugin url.

    https://wordpress.org/plugins/search-and-replace/

    Just install that plugin and find all the item which having old url and by enterning old url in search field and in the replace field enter the new server url.

    hope this will help to resolve the problem.

  2. Most people who relocate a WordPress installation use a plugin for that purpose. The media paths you speak of are embedded in the database, many of them inside the text of posts and pages. The plugin authors have worked out the intricacies of updating them.

    I have used Duplicator. https://wordpress.org/plugins/duplicator/ It’s free and it works. There are plenty of others out there.

  3. Here’s another way.

    You can use the Search and Replace script from interconnectit. It’s free.

    I have used this many times without any issues. Just upload the file to your server and follow the instructions. When you reach the search and replace screen just type the domain name of your old site (I.e. example.com) and replace it with the new domain (I.e. example1.com).

    Don’t forget to delete the file when you are done.

  4. I will recommend you go through plugin.But if you would love to do manually, you can find and replace url in your database using notepad++ or Adobe Dreamweaver.

    you just need to replace old domain/sub-domain with new one.

Comments are closed.