• I’ve been on the codex, I’ve posted here before and was given a suggestion to use the ‘search and replace’ plugin (which did work great for the posts images and links to media files).

    However – we still can not figure out how to change all instances in the database of the testing url to the real url. I am going on my 8th site I’m trying to move and still can’t get this to work flawlessly (with someone else over my shoulder following instructions on the codex).

    I’ve got a huge site that was developed in a testing url and we went thru the codex method (go into the the admin, change the two instances of the url under the settings, change the config file if need be) – then used that plugin to change the rest – but even when I tell it change them all it still doesn’t. For example, the banner still points to the testing domain, and one of the plugins that pulls in video from YouTube is malfunctioning (it worked fine at the testing url on the same server, but isn’t since we’ve changed the domain names). Nothing else has changed except the addition of new posts.

    Now, I’m fairly green when it comes to databases, but my boss is a seasoned ColdFusion programmer and writes her own shopping cart sites etc. She went in and changed the urls within the database and the site totally bombed.

    Are there places in the database that are NOT to be changed? What is the most efficient way to change the URL of a HUGE site?

    We are hosing on HostGator if this has anything to do with anything.

    ********************

    Came back to say that just for an ‘experiment’ we went into the database via phpmyadmin and found where it was calling the banner image and changed the url (no type errors, there were two of us) – and yes, it broke the site again (it killed all my categories being listed up in the custom menu).

    How do you get a wean a wordpress site totally off its development url?!?!

    WTH? ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • I just use the DB constants in wp-config.php. I’ve moved lots of sites with thousands of posts and users (30,000 posts with 10,000 users). Never had an issue.

    https://codex.www.ads-software.com/Editing_wp-config.php

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    the DB constands in wp-config – I’m not following you. I don’t change the wp-config if they are not changing servers. I’m just changing the URL. This just confused me so much I went in and opened a config file and I don’t see any reference to the site’s URL (domain name) (even did a ‘find’ for “.com” to be sure).

    Let me re-word. We develop sites on a test domain name on ServerX under the site’s own (named) database. They go live on ServerX using the same db but with their real domain name.

    https://codex.www.ads-software.com/Changing_The_Site_URL

    Changing the Config file
    You will need to update your WordPress configuration file if your database has moved or changed in certain ways.

    You will only need to modify the config file if:
    your database has moved to another server and is not running on your localhost
    you have renamed your database
    you have changed the database user name
    “‘Make a backup copy of your wp-config.php file.'”
    Open the wp-config.php file in a text editor.
    Review its contents. In particular, you are looking for the database host entry.
    Save the file.
    At this point, your WordPress blog should be working.

    Does the banner being pulled from the old domain have something to do with ‘Permalinks’ at all? While my permalinks are working, and all my ‘media’ items are showing up correctly after running the ‘search and replace’, why is was the banner still being pulled from the old domain?

    For sh*ts and giggles I went in to the admin under ‘headers’ and was going to manually re-upload the header (which really annoyed me) and found that the button for “RESTORE ORIGINAL HEADER”. I clicked it and it worked.

    Same file (it isn’t like the site was using a header image that was manually uploaded via the admin – I’ve got it calling it by file name from the functions.php file).

    So I basically have three questions;

    1. How do you get all the urls changed first go?

    2. Why did the site bomb when we went into the database via phpmyadmin and changed only the reference to the URL for the header?

    3. Does htaccess have something to do with this (we are newbies to linux servers – we’ve had windows servers before this year)?

    I do the same thing all the time. It starts at https://test.site.com and I move it to https://site.com by changing the DB constants for WP_SITEURL and WP_HOME to the new value. Never had any trouble.

    https://codex.www.ads-software.com/Editing_wp-config.php#WordPress_address_.28URL.29

    Only once did I search the DB for the old values and I decided it sucked and WordPress must have a better way. It does.

    You can also move WordPress ‘up’ one directory easily. So you’d install it at https://site.com/wp and move it to https://site.com. The admin area is still available at https://site.com/wp/wp-admin but the front end it as the new location.

    https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    This is what I did based on the codex info;

    1. Log into the admin at olddomain.com, change the two places for the domain name in the general settings – close the site

    2. Go to the newdomain.com – I can get into the site… but just changing those two values has not changed all other references to ‘olddomain.com’ in the database. Not even close. ESMI directed me to a plugin that will find/replace those references within posts and that worked great, until I realized that the banner was STILL being pulled from the olddomain.com.

    So based on what you posted curtismchale;

    WordPress address (URL)
    WP_SITEURL, defined since WordPress Version 2.2, allows the WordPress address (URL) to be defined. The value defined is the address where your WordPress core files reside. It should include the https:// part too. Do not put a slash “/” at the end. Setting this value in wp-config.php overrides the wp_options table value for siteurl and disables the WordPress address (URL) field in the Administration > Settings > General panel.

    NOTE: It won’t change the Database value though, and the url will revert to the old database value if this line is removed from wp-config. Use the RELOCATE constant to change the siteurl value in the database.

    Relocate method
    WordPress supports an automatic relocation method that will figure out and update those values for you automatically. This method is intended to be a quick assist to getting a site working when relocating a site from one server to another.

    To use it:

    1. Edit the wp-config.php file.

    2. After the “define” statements, add this new one:

    define(‘RELOCATE’,true);
    3. Go to the wp-login.php page in a web browser.

    4. Login as per normal.

    When the RELOCATE flag is set to true, the Site URL (NOT the home setting) will be automatically updated to whatever path you are using to access the login screen.

    This will get the admin section up and running on the new URL, but it will not correct any other part of the setup. Those you will still need to alter manually.

    You should remove the additional line after the site is up and running. Do NOT leave it enabled.

    I’m not moving from one server to another – and I can always get the site to ‘show up’ so I can log in but…

    What you posted (and what I bolded in the quotes) sounds like band-aids to get into a site that you’ve changed the url’s to and you couldn’t get in. Am I misunderstanding this?

    I’m not sure why the banner wouldn’t get changed over with the search and replace pluign.

    That’s a pretty good plugin…. doing a search and replace on the raw data directly in the database doesn’t work. Someone else can probably help you with the technical on that, but it has to do with serialized data stored in the DB, which is what causes some of your layout to blow up

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    I am so open to ideas on the best way to change the url (not servers). ??

    Rev VooDoo thanks for the answer about the serialized data – at least it gives me some kind of vague reason to believe I’m not losing my mind. *smirk* ??

    Now what is odd, is the main site in question (the one with the banner not changing) I’m having trouble with a redirect using another plugin that WE (as in two of us here) SWORE worked find, wonderful, client excited and happy, on the test URL – https://www.ads-software.com/support/topic/plugin-automatic-youtube-video-posts-video-page-is-going-to-youtube?replies=1

    It doesn’t work now – coincidence with the change of the site URL?!?

    Is the banner coded in to the template, like in the CSS file? I’ve had that catch me a time or two.

    A link to the site with the wonky banner would be helpful.

    Have you tried uninstalling and installing the plugin in question? Not an answer I know but that’s what I would do just to get it working then see what the route cause is.

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    I fixed the banner issue by going in ad selecting the default – and it wasn’t in css ??

    SO – mucking up this database – the problems I’m having with the YouTube video plugin I believe are totally related to changing the site’s url.

    Here is the site in question – https://www.tarheelcanine.com/category/videos/ open it in Chrome, FF and it redirects to YouTube. Open it in IE and it redirects the sites homepage. Weird.

    Same exact site files (from the theme to the plugin itself), on its own brand new database, and no redirect. :-\ https://www.ratest6.com/category/videos/

    I have tried deactivating the plugin but that did nothing to help the issue. If I delete the plugin (uninstall or whatever) is that going to remove it from the database? :-\

    I’m going to go try it…

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Ok, deleting the plugin is of no help because it keeps the settings in the database. ?? Boy I really mucked up this database.

    I think I need a drink.

    i constantly develop locally “https://myofflinesite:8888” and than go online “https://therealsite.com” and don’t have much of a trouble

    the search and replace plugin doesn’t go into all the tables and fields

    my approach is:
    – from my local phpMyAdmin, export the database into .sql format
    – open it in a text editor (notepad++, textmate, or similar)
    – search and replace for the full string
    – search for partial string “:8888”, as some instances may not have “https://”, replace as needed
    – save
    – import into the online phpMyAdmin
    – done
    + minor adjustments (eventually, a theme or plugin preference gets lost)

    or…. use a virtual host locally, and then you can develop using your real URL, that keeps things extra simple!

    I’m just not sure the OP is looking to dev on localhost

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Changing a WP site's url – have had problems with each site I've moved’ is closed to new replies.