PHP/Wordpress URL change broken

Ted Roche tedroche at gmail.com
Mon Apr 14 10:20:38 EDT 2014


On 04/14/2014 09:50 AM, Tyson Sawyer wrote:
> Wordpress seems to embed the sites URL in EVERYTHING. WTF!  What is
> wrong with leaving the host name out to access the files from the
> "current host"?  I admit that I've not played much with web pages
> since HTML 2 or so and most of my experience is typing up very simple
> pages with emacs, but is this really how it has to be done?

Well, no, but WordPress is a very organic codebase: it has grown and
grown over the years from a simple web hosting site to a CMS with tens
of thousands of plugins that depend on older behaviors, features and
APIs. So, there's a lot of cruft. There's a lot of tweaking of the URLs
in various places in the code. It's a bit rough.

> Here is what is potentially the worst part:  We have manually done
> some searching and editing of URLs embedded in the mySQL records with
> a phpAdmin tool.  I am now finding warnings online saying that some
> plugins will embed the URL length in the data and simply editing the
> string will break things.
>
> I found this page, but I suspect it is for people who haven't screwed it up yet:
>
> http://pixelentity.com/wordpress-search-replace-domain/
>
> How screwed are we?
>
Well, if you have a clean backup from before the period that you started
searching-and-replacing, there's a number of plugins that can do the job
properly for you.

If you don't have a backup, well.

Make one now.

Un-search-and-replace all of the occurences you can find of your new URL.

Make a backup of that.

Then try one of the plugins designed to do the domain move.

There are two NH groups that specialize in WordPress, one in Manchester
(that meets tonight) and one on the seacoast. You might want to join
their Meetups and get some expert help there.


-- 
Ted Roche & Associates, LLC    http://www.tedroche.com/



More information about the gnhlug-discuss mailing list