Forums

[resolved] Trying to change the location of wordpress to mydomain.com (22 posts)

  1. kaspara
    Member
    Posted 5 months ago #

    As the title says. Trying to change it from mydomain.com/myblog to mydomain.com. I've tried many step-by-step guides, the only one I have left is this one http://codex.wordpress.org/Moving_WordPress, but I'm finding it difficult, and I'm scared of doing things wrong and ruining everything- isnt there an easier way?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 5 months ago #

  3. kaspara
    Member
    Posted 5 months ago #

    Thanks, but I've tried it, twice, done all steps, and nothing seems to change?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 5 months ago #

    Then I can only assume you're missing something. I've used this approach to move a site to the root domain many times without any problem.

  5. kaspara
    Member
    Posted 5 months ago #

    I tried again, but I still get stuck at this point:

    7: Login to your site. It should still be http://example.com/wordpress/wp-admin/

    Where I'm not directed to my admin, but my fragmented blog, and this message:

    "404 Error: Not found

    The page you trying to reach does not exist, or has been moved. Please use the menus or the search box to find what you are looking for "

  6. Tim S
    Member
    Posted 5 months ago #

    It's sounds as if you've moved your files. Hence the 404 error. Did you attempt to move the files previously?

  7. kaspara
    Member
    Posted 5 months ago #

    Am I moving the files from point 4 to the wrong place? I'm assuming "the root directory" is the top folder, from which all the other folders open? Thats where I placed them..

  8. kaspara
    Member
    Posted 5 months ago #

    No, I copy them. I accidentally moved one of them, and had to add it again from my downloaded wordpress folder, and then I started over.

  9. kaspara
    Member
    Posted 5 months ago #

    Well, I havent made any other changes than that, besides that I had to add

    define('WP_HOME','http://mydomain.com/myblog');
    define('WP_SITEURL','http://mydomain.com/myblog');

    in my wp-config.php, so thats where I change the URL instead of in the general panel as described in 1,2 and 3 of the guide. If I remove the code, I cant enter admin or anything else, and I only added it because I thought by changing the URLs in the general panel would do what I'm trying to achieve, instead it became impossible to access wordpress.

    Other than that I've followed the guide stricktly.

  10. kaspara
    Member
    Posted 5 months ago #

    I've now tried using the public_html folder instead, if perhaps that was the meant root(because this is the first time I've tried this stuff), but the exact same thing happened..

    Edit: Alright, I change the

    define('WP_HOME','http://mydomain.com/myblog');
    define('WP_SITEURL','http://mydomain.com/myblog');

    to

    define('WP_HOME','http://mydomain.com');
    define('WP_SITEURL','http://mydomain.com');

    Is that wrong?

    And by changing

    require('./wp-blog-header.php');
    to
    require('./wordpress/wp-blog-header.php');

    "using your directory name for the WordPress core files:"

    I dont quite know what they mean, english is not my first language, and I dont see where they mean I though place the directory name, but I've tried many variations, but I wish they worded it differently..

  11. Tim S
    Member
    Posted 5 months ago #

    The public_html folder is the root folder for your domain if it is your primary domain on your account. What happens when you change the site over and you visit your domain in a web browser? Does the site display?

  12. colinb51marketing
    Member
    Posted 5 months ago #

    Hi Kaspara,

    I just changed my wordpress url on Mydomain heres how -

    1. Login to your account
    2. Click Hosting & Services
    3. Click Configure
    4. Click Web Applications
    5. Click Blogging and Content Management
    6. Click WordPress
    7. Select the domain you wish to edit
    8. Click Change Location
    9. Enter the new Location. If / is entered as the location, the blog will load by just by typing the domain name
    10. Click Submit

    Hope that helps you

  13. kaspara
    Member
    Posted 5 months ago #

    Stupid of me not to think of the mydomain site.. I didnt mean that I use mydomain, so your advice doesnt help me in this case Colin- but thank you so much for trying.

    I use HostGator, and Tim thats exactly what my .com shows when I've done the changes. It shows a default getting started page, and my .com/myblog is all mixed up (but returns to normal when I turn the config links back). I'm getting tired of trying the same things over and over, and must be missing something really obvious since this seems like something thats usually pretty straightforward... But I'm doing exactly what the guide says..

  14. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    Alright, I change the

    define('WP_HOME','http://mydomain.com/myblog');
    define('WP_SITEURL','http://mydomain.com/myblog');

    to

    define('WP_HOME','http://mydomain.com');
    define('WP_SITEURL','http://mydomain.com');

    Is that wrong?

    Yes.

    Step 2 was "In the box for Site address (URL): change the address to the root directory's URL. Example: http://example.com"

    So you should have this:

    define('WP_HOME','http://mydomain.com/myblog/');
    define('WP_SITEURL','http://mydomain.com/');

    See? WP_HOME is where the actual folder is. WP_SITEURL is how you want it to display.

    Also

    And by changing

    require('./wp-blog-header.php');
    to
    require('./wordpress/wp-blog-header.php');

    Should be require('./myblog/wp-blog-header.php'); (using your example).

    Make sure that's ONLY changed in the COPY of the file in your / folder :)

    So you have TWO index.php's, one in the main folder, and one in myblog. Do not edit the one in myblog.

  15. kaspara
    Member
    Posted 5 months ago #

    Oh all of that made so much sense! Thank you SO much :D

    But, all that changed was that, although the blogs static page is now placed on the .com for the first time- its just as broken as it all was before when I changed the config?

    Also the admin leads me to a not found page.

  16. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    The admin will remain domain.com/myblog/wp-admin

    Go in and re-save your permalinks :)

  17. kaspara
    Member
    Posted 5 months ago #

    That leads me to

    404 Error: Not found

    The page you trying to reach does not exist, or has been moved. Please use the menus or the search box to find what you are looking for

    I'm absolutely sure I havent changed more files than I should have, and I have the right files copied..

    Any thoughts?

  18. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    What's teh REAL URL of your site?

  19. kaspara
    Member
    Posted 5 months ago #

    tkselsvold.com

  20. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    Okay.

    If you look at http://tkselsvold.com/myblog/wp-login.php

    You can see the UNFORMATTED screen. That is pointing to http://tkselsvold.com/wp-admin/css/login.css?ver=20110610

    instead of http://tkselsvold.com/myblog/wp-admin/css/login.css?ver=20110610

    That means your files are still in myblog (GOOD!)

    What's in the .htaccess file in the tkselsvold.com folder, and what's in the index.php file in that same location?

  21. kaspara
    Member
    Posted 5 months ago #

    At least I've done something right! :)

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /myblog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /myblog/index.php [L]
    </IfModule>
    
    # END WordPress

    And the index.php is

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./myblog/wp-blog-header.php');
    ?>

    And thank you so much for the help so far, I really appreciate it.

  22. kaspara
    Member
    Posted 5 months ago #

    I dont really get it, but with the correct thing to put in the index file that you wrote for me earlier, and changing BOTH URLs:

    define('WP_HOME','http://tkselsvold.com/myblog');
    define('WP_SITEURL','http://tkselsvold.com/myblog');

    Fixed everything for me! The wordpress is on the .com, and admin and theme works well.

    Makes me wonder why it breaks when I do it like the guide says, but I'll just keep it like this then! :) Thanks so much for your patience and advice :D

Reply

You must log in to post.

About this Topic

Tags

No tags yet.