• Dears,

    I’m doing my website in my local host and make pages with galleries like bellow code :-

    <dt>
    <a href='https://localhost/ar/wp-content/uploads/2013/02/1.jpg' title='1'>
    <img width="150" height="150" src="https://localhost/ar/wp-content/uploads/2013/02/1-150x150.jpg" class="attachment-thumbnail" alt="1" /></a>
    </dt>

    After i finish all pages and make backup and import the backup to my online domain, the images not shown and when i check i found them in links which refer to “https://localhost/ar/…&#8221;

    what is the code i can add which will work in local host and my online domain ?

    Like : src=”<?php header_image(); ?>” which refer to header image without add the domain link.

    Wish someone help

Viewing 2 replies - 1 through 2 (of 2 total)
  • The content of pages and posts are kept in the database. Since the URL’s were hard-coded into the page or post you have a few options:

    1. Use a plugin to find and fix the broken links.
    https://www.ads-software.com/plugins/broken-link-checker/
    2. Use phpMyAdmin to search and replace those url’s. Note: If you are not overly familiar with MySQL databases and phpMyAdmin do not use this approach and even if you are it will be to your detriment to do so without a backup (not the ones from local but a most recent backup from the site)

    Oh…there is a third option, which requires that you create a backup of the local install’s db export file…open the export file in a plain text editor and edit the url’s (find and replace) – any errors doing so may lead to a bad db when imported at site

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add code in gallery which refer to my domain’ is closed to new replies.