WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] accidentally changed URL under General Settings..now can't access dashboard (27 posts)

  1. c-amar
    Member
    Posted 1 year ago #

    Hi,

    So I accidentally changed the company's website from http://www.amar-international.com/wordpress to http://www.amar-international.com. I did this under the General Settins tab of the dashboard. Unfortunately, I didn't carefully realize the consequence. Now I cannot go to the login page and the company's website doesn't load. When going to the company website it does have Home, About, Services, etc. all in a row; but when you click them nothing happens.

    I have tried solutions from the following forums:
    http://wordpress.org/support/topic/cant-access-wp-admin-after-changing-url-to-the-website

    http://codex.wordpress.org/Moving_WordPress

    http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29

    http://codex.wordpress.org/Changing_The_Site_URL#Edit_functions.php

    But I must be doing something wrong because they all did not work.

    I just want everything to go back to the original URL (http://www.amar-international.com/wordpress).

    PLEASE HELP!!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You'll need to use one of the methods in the link you posted above - here:

    http://codex.wordpress.org/Changing_The_Site_URL

    to change those settings back.

    What, specifically did you try?

  3. c-amar
    Member
    Posted 1 year ago #

    More specifically this is what I tried: (I did the edit function.php first)

    - went into FileManager, then clicked on the "wordpress" folder
    - clicked on the "wp-includes" and clicked on "functions.php"
    - entered the following right after "<?php"

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

    saved this modification.

    reloaded http://www.amar-international.com/wordpress/wp-login.php and it gave me a weird (not the same login page I remembered) login page. When I entered the username and password, the page loads to a page with the Home, About, Services, etc. all in a row; but when you click on any of them nothing happens.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Did you use your URL instead of "example.com/blog"

  5. govpatel
    Member
    Posted 1 year ago #

    - went into FileManager, then clicked on the "wordpress" folder
    - clicked on the "wp-includes" and clicked on "functions.php"
    - entered the following right after "<?php"

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

    saved this modification.

    You need to use Theme fuctions.php file not wp-includes fuctions.php file.

    You need replace with your urls http://www.amar-international.com/wordpress

  6. c-amar
    Member
    Posted 1 year ago #

    oh yes of course.

    update_option('siteurl','http://www.amar-international.com/wordpress);
    update_option('home','http://www.amar-international.com/wordpress');

  7. c-amar
    Member
    Posted 1 year ago #

    so the root folder doesn't have "Theme" functions.php.

    The root folder does have "htdocs" folder. Inside this folder there is no "Themes" folder. There is a "wordpress" folder. Inside this "wordpress folder" there is no "Themes" folder. There is a "functions.php" as mentioned earlier. There is a folder called "wp-content" which does have "themes" folder, but no "functions.php".

    WPyogi & govpatel thank you so much for helping. I'm sure all of this could be resolved via phone tech support. But this forum will do. I'll b on until this is resolved. Oh and I've backup up the FTP files.

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    What theme are you using?

  9. c-amar
    Member
    Posted 1 year ago #

    esmi, I do not know what theme? Will it say in the directory?

  10. govpatel
    Member
    Posted 1 year ago #

    All themes should have functions.php file which will be in httdocs/wordprees/wp-content/themes/your theme.

    The other way to check if you have correct urls is to go database if you are familiar I have video on how to reset urls on my site

  11. esmi
    Forum Moderator
    Posted 1 year ago #

    You appears to be using the redie-30 theme. Check that theme's folder in wp-content/themes.

  12. govpatel
    Member
    Posted 1 year ago #

    Looking at your code I see
    <link rel="stylesheet" href="http://www.amar-international.com/wp-content/themes/redie-30/style.css" type="text/css" media="screen" />
    which does not have wordpress in url where wordpress is installed.

  13. c-amar
    Member
    Posted 1 year ago #

    Ok. I see.

    So I did find the "functions.php" I applied the following

    update_option('siteurl','http://www.amar-international.com/wordpress);
    update_option('home','http://www.amar-international.com/wordpress');

    with the "wordpress"..loaded a couple of time and it gave me an error

    Parese error: syntax error, unexpected ',' in/data/10/0/141/114/793440/user/813114/htdocs/wordpress/wp-content/themes/redie-30/functions.php on line 2

    Then when I removed this "update_option..." the company login loads, but again I cannot log into the dashboard.

    Without the "wordpress" inserted in the URL, so below:

    update_option('siteurl','http://www.amar-international.com');
    update_option('home','http://www.amar-international.com/');

    I get this:
    Parse error: syntax error, unexpected ',' in /data/10/0/141/114/793440/user/813114/htdocs/wordpress/wp-content/themes/redie-30/functions.php on line 2

  14. c-amar
    Member
    Posted 1 year ago #

    oh..i did include an apostrophe in the above updated_option..just so you know.

  15. c-amar
    Member
    Posted 1 year ago #

    I figured that if I can get into the dashboard then I can fix this mess I've created. I should have read the "Changing The Site URL" (http://codex.wordpress.org/Changing_The_Site_URL) before actually making the change in the General Settings of the dashboard.

  16. govpatel
    Member
    Posted 1 year ago #

    You can not change the urls in Settings>>>General with out moving your wordpress files folders in root if that is what you want so you do not have wordpress in urls.

    The other way is to use wordpress from a directory and you will find instructions here

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

  17. esmi
    Forum Moderator
    Posted 1 year ago #

    You cannot login to your WordPress dashboard until you correct the site url issue. Follow the directions in Changing_The_Site_URL carefully.

  18. c-amar
    Member
    Posted 1 year ago #

    Ok. So I opted to use the Relocate method. But I cannot get passed step 4, because step 5 states to login as per normal when the screen only loads to a page with the Home, About, Services, etc. I have also refreshed the website, but nothing happens.

    Also, in the "Moving WordPress" under "If you have accidentally changed your WordPress site URL" in bold it states that "...(but still can access the login page, through a redirection or something)", this doesn't apply because I cannot login to the page. I did the step anway, but the webpage loaded to a page with the Home, About, etc. (same as above).

    I do not understand where I am making the error

  19. govpatel
    Member
    Posted 1 year ago #

    Looks like you still have urls in Settings>>>General wrong from where you have installed wordpress.

    If you can let us know where exactly you have wp-admin,wp-incudes,and wp-content folders along with all wp- files.

  20. c-amar
    Member
    Posted 1 year ago #

    Ok. from the FileManager:

    Directory:root
    Folder: htdocs

    Directory:root: /htdocs
    Folder: wordpress
    PHP file: index.php
    PHP file: index.php4
    PHP file: reseturl.php

    Directory:root: /htdocs/wordress
    Folders: wp-admin, wp-content, wp-includes
    PHP files: wp-config.php, wp-login.php

    hope this helps?

  21. c-amar
    Member
    Posted 1 year ago #

    WAIT!!!

    after awhile it started to work! Site is up and running as normal and the login page is back.

    ok. so the option of editing the functions.php DID work. I just needed to wait like an hour and refresh frequently for the site to work again.

  22. c-amar
    Member
    Posted 1 year ago #

    Thank you so much for being patient with me.

    I truly appreciate your help in this matter.

    I'm not panicking anymore

  23. govpatel
    Member
    Posted 1 year ago #

    Ok if you have site working then you need to delete them two lines else it keep on resetting urls everytime you open wordpress.

    Now if you want to take out wordpress from url you need to follow the link I posted using wordpress from directory.

  24. c-amar
    Member
    Posted 1 year ago #

    Yep I already deleted the two lines.

    I will spend some time reading and re-reading your link to make sure this won't happen again when removing the "wordpress" from the url.

    THANK YOU SO MUCH!

  25. govpatel
    Member
    Posted 1 year ago #

    You are welcome

  26. Cruthu
    Member
    Posted 5 months ago #

    Hi - the same thing has happened to me. I followed all the instructions here but have only managed to get my homepage back. I can see from the backend of the site that all my pages are still there but when I click on the link it only shows a blank page. Has anyone got any ideas at all?

  27. esmi
    Forum Moderator
    Posted 5 months ago #

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

    And next time time, please post your own topic instead of in one that is 8 months old.

Topic Closed

This topic has been closed to new replies.

About this Topic