WordPress.org

Support

Support » Plugins and Hacks » Root Relative URLs » [Resolved] [Plugin: Root Relative URLs] Help installazion

[Resolved] [Plugin: Root Relative URLs] Help installazion

  • Hello, I have no confidence with php & programmin so i’d like have some clarify before installa plug-ing.

    1. if I insert some line or domain name or whatever incorrect there will be a problem to the all site? If I disable plug-in the domanin came back to the origin?

    2. How i have to complete the comment for edit wp-config.php? Only insert my domani after “http:”? In this way?

    define('WP_HOME', 'http://www.mynewdomain.com' . $_SERVER['HTTP_HOST']);
    define('WP_SITEURL', 'http://www.mynewdomain.com' . $_SERVER['HTTP_HOST']);
    define('WP_CONTENT_URL', '/wp-content');
    define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);

    3. I have to do something else to change domain? To database or server od domain itself or whatever?

    Thank you for your time,congratulations for your baby!

    http://wordpress.org/extend/plugins/root-relative-urls/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author MarcusPope

    @marcuspope

    1. Any problem with the plugin will be fixed if you disable/uninstall it, and remove the code from wp-config.php. The changes it makes to content in the database will work 100% with or without my plugin, so if you disable it in the future your site will continue to work.

    2. You’re close, but you need to use the code exactly as I provide. You should not add your domain to the http: section, so you need to remove http://www.mynewdomain.com or just re-copy from the installation notes.

    3. That’s it, you’re site should work as it always did before. If you run into any issues just let me know.

    And thanks for the congratulations… she’s almost here!

    Wonderful! But well, maybe it’s so simple that i don’t understand… wnere do i setting my new domain?

    Thank you, and say hello to her!

    Alessio

    Plugin Author MarcusPope

    @marcuspope

    That’s the beautiful feature of root relative urls, you don’t have to specify a domain name. With my plugin activated all urls will look like this:

    /blog/2012/09/Root-Relative-Urls-Rock

    Which means when you can access your site in any of the following ways:

    http://www.mynewdomain.com/blog/2012/09/Root
    http://62.194.28.85/blog/2012/09/Root
    (fake ip used as an example)

    Browsers, search engines and most everything that handles internet traffic will know to re-use the domain name you used in the browser address field when it encounters a url that starts with a forward slash “/”

    And if you ever need to migrate your site to another host, or perhaps you need to add a domain with a country specific extension to your site, you can do so without changing your content.

    Please note, that if you have existing content the links will still have the domain name in them. Unfortunately I don’t have a fix for that just yet. My best recommendation is to either do a search and replace on “http://www.olddomain.com/” and replace it with “/” (be sure to include the “/” in the search term.) as described here: http://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database

    Another option, if you are not comfortable with the above, would be to edit the content by hand using the html editor. Just remove the “http://www.olddomain.com” portion of the urls and images/video links. That can be a lot of work of course, but this is also something that experienced WordPress contract developers can knock out in under an hour, so maybe paying someone $50 dollars or so to do it for you is a better option if our site is really big.

    She’s only days away at this point, but I’ll do what I can to help you through this 😀

    Thanks,
    Marcus

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Root Relative URLs] Help installazion’ is closed to new replies.
Skip to toolbar