• Resolved pixel8er

    (@pixel8er)


    Good afternoon

    I was trying to edit the main URL of my site so that it was http://www.cadsmarter.com instead of http://www.cadsmarter.com/blog and in removing the ‘blog’ part from the address it has broken the site.

    My understanding is that I needed to use FTP to move all the files in the blog directory to the parent directory. Is that correct? I’ve managed to get into the FTP and copy the blog directory into the parent directory. But when I try to go to http://www.cadsmarter.com I still get an error message – see attached image.

    Do I need to wait for it to percolate through? Or do I need to do something else. I assume once it’s fixed I can then delete the blog sub-directory as I’ve now copied it into the parent directory?

    Thanks for any help
    Paul

Viewing 15 replies - 1 through 15 (of 20 total)
  • “WordPress Address (URL)” and “Site Address (URL)”
    probably still refers to old location: http://www.cadsmarter.com/blog
    You need to change that.

    I know you can change these using /wp-admin/options-general.php

    Because you copied the files across this probably wont run. One thing I can suggest is put the files back to /blog

    Goto Dashboard (/wp-admin/index.php)

    Go to Settings (on the left) and
    change

    WordPress Address (URL)
    and
    Site Address (URL)

    to : http://www.cadsmarter.com

    Then copy the files over. I haven’t tried it. This is just a calculated guess.

    Thread Starter pixel8er

    (@pixel8er)

    Hi anisur57
    Thanks for your reply.

    I originally broke the site by changing either the “WordPress Address (URL)” or the “Site Address (URL)” – I can’t remember which one. I still have the files in both the blog directory and the parent directory.

    But….I’m not sure how to get into the dashboard anymore….I keep getting an error

    Thanks
    Paul

    Change the urls back. See Changing_The_Site_URL for details of how to do this correctly.

    Thread Starter pixel8er

    (@pixel8er)

    Hi esmi
    Thanks for your reply.

    I found the info and I’ve been trying the method of editing the functions.php. Where it says to add the 2 lines of code am I adding the URL as it was before I broke it? Or as I want it to be? Either way neither is working.

    My URL was previously:
    http://www.cadsmarter.com/blog

    and I want it to be:
    http://www.cadsmarter.com

    So should the 2 lines look like this

    update_option('siteurl','http://http://www.cadsmarter.com:port/blog');
    update_option('home','http://http://www.cadsmarter.com:port/blog');

    or like this:

    update_option('siteurl','http://http://www.cadsmarter.com/blog:port/blog');
    update_option('home','http://http://www.cadsmarter.com/blog:port/blog');

    Thanks
    Paul

    Where it says to add the 2 lines of code am I adding the URL as it was before I broke it?

    I’d suggest reverting back to the original urls. Then we can look at what it is that you are trying to do.

    If you have access to the database directly, preferably using a tool like phpMyAdmin, you can do this pretty easily. Log in to phpMyAdmin using the credentials listed in your wp-config.php file. Go into your site’s database, and browse the table named ‘wp_options’. You’re looking for two entries: ‘siteurl’ and ‘home’. They should both have the same value – that is, the old location of your site. Edit each of these to reflect the new location of your site. They should have identical values to each other. Once that’s done you should be all set, and able to access your site and the admin dashboard.

    Thread Starter pixel8er

    (@pixel8er)

    As the original url was
    http://www.cadsmarter.com/blog

    I edited the 2 lines of code to this
    update_option('siteurl','http://http://www.cadsmarter.com/blog:port/blog');
    update_option('home','http://http://www.cadsmarter.com/blog:port/blog');

    How long before it should work? Instantly? This is what I get

    http://i1339.photobucket.com/albums/o719/pixel8er/Capture9-08-2013-105136PM_zps8c221b14.jpg

    Instantly?

    Yes.

    Thread Starter pixel8er

    (@pixel8er)

    Hi Christaan
    Thanks for the reply.
    That might be beyond my skills – at the moment. I’ll see if I can find a clear tutorial
    Thanks
    Paul

    Thread Starter pixel8er

    (@pixel8er)

    I noticed that I had made an error in the 2 lines of code – I had a double http. Also I added www. So I corrected it as below:

    update_option(‘siteurl’,’http://www.cadsmarter.com/blog:port/blog’);
    update_option(‘home’,’http://www.cadsmarter.com/blog:port/blog’);

    But when I try the website I still get:

    http://i1339.photobucket.com/albums/o719/pixel8er/Capture9-08-2013-105136PM_zps8c221b14.jpg

    Am I doing the 2 lines of code wrong?

    Why are you trying to use /blog:port/blog?

    Thread Starter pixel8er

    (@pixel8er)

    Thread Starter pixel8er

    (@pixel8er)

    It may be that I’m interpreting the Codex website info incorrectly. I’m not sure what the ‘port’ or ‘blog’ part of the code is needed for.

    If I want my website url for the main page to be
    http://www.cadsmarter.com

    then reading from the codex website instructions the code I need to enter is:

    update_option('siteurl','http://www.cadsmarter.com:port/blog');
    update_option('home','http://www.cadsmarter.com:port/blog');

    Not sure if that’s correct…doesn’t look so with the ‘port’ and ‘blog’ in there

    I think that document is wrong (just noticed it via someone else with the same problem) – it should be:

    update_option('siteurl','http://yourdomain.com');
    update_option('home','http://yourdomain.com');

    This http://yourdomain.com should be what those settings were before.

    Thread Starter pixel8er

    (@pixel8er)

    Hi WPyogi
    Thanks for your reply.

    Ok so I amended the functions.php file to include these 2 lines of code

    update_option('siteurl','http://cadsmarter.com/blog');
    update_option('home','http://cadsmarter.com/blog');

    then via FTP I uploaded it. I had the blog directory in 2 places as I had already moved it out into the main parent directory – and this was the one I had been updating with the amended functions.php. I was scratching my head wondering why it wasn’t working. Then I uploaded the functions.php to the original blog subdirectory – and it worked!

    So…my questions is now how do I change the main url to remove the ‘blog’ part?

    I want my main url to be:
    http://cadsmarter.com

    and I will have a separate page for the blog

    Thanks again everyone for helping a newbie out
    Paul

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Site broken after editing address’ is closed to new replies.