• I am developing a site to replace an existing one. When finished I will use the existing sites URL. My problem lies with what to do about hard coded references within the WordPress site. There have been instances on the site being developed where I’ve needed to hard code the url into the html used by a widget/plugin. Is there some way of doing a search and replace so that when the new site is switched over the the old url I can update the html references accordingly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hard-coded references where? In your theme or the WordPress core?

    Thread Starter Mr Wood

    (@mr-wood)

    The theme I guess. It’s where I’m using an image effects plugin to point to a particular place on the site. The short code it uses (see below) has a reference to the particular page it links to – and that is hard coded.

    [fxgallery style="two" size="full" imagealignment="left" last="yes" background="#0f9600" overlay="black" icon="Magnifying-Glass" deactivateicon="no" caption="Lots of 360 degree wraparound videos for you to take a look around" textalign="left" textcolor="light" linktype="page" pagelink="virtual-tour (183)" postlink="559 (559)" target="self"]<img src="
    https://hulmehallschool.ismysite.co.uk/wp-content/uploads/2013/08/school-map.png" width=400 height=400 />[/fxgallery]

    Check if you have the same problem when using a WordPress default theme (2012 or 2013).

    Thread Starter Mr Wood

    (@mr-wood)

    The code is in a widgetised area that does not exist on the default theme. I guess I’m just asking about a find/replace system that covers what is in the database, for the aspects that stop working when I change to final url

    I found this script very helpful and perfect, i think you might want to try it too

    search and replace script for database

    Thread Starter Mr Wood

    (@mr-wood)

    Thanks, that looks like just the thing. I’m relatively new to all of this and thought I might have missed something – but this looks as though it will do just exactly what I want.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing URL – coping with hard coded references’ is closed to new replies.