WordPress.org

Ready to get started?Download WordPress

Forums

HELP! Changed wordpress URL by mistake, can't access files (8 posts)

  1. pennywilliams
    Member
    Posted 3 years ago #

    In general settings yesterday, I changed the wordpress URL by accident trying to move my site to the main url out of the /wordpress directory. After a couple hours on the phone with my hosting company, they were able to have me make a change that got me back into the wordpress admin for the site, (even though they said they don't support it and wouldn't help with that kind of issue again).

    So I was in and all looked good and I ended my call with them. Then I started trying to access things from the dashboard and found that I still can't access. If I click "comments" I get "The page cannot be found" error. If I click posts, pages, anything, I get the same error message. All my images placed within a post or page are missing on the site too. Basically, nothing works in my dashboard and photos are missing on my site which is now live at my url that receives hundreds of hits a day.

    I am not a programmer so please leave step-by-step instructions on how to fix this. Very desperate.

    http://downtownashevillecondos.com

  2. pennywilliams
    Member
    Posted 3 years ago #

    I should mention that I went into a php admin through my host and updated the site url field in the file wp-options and returned it to http://downtownashevillecondos.com/wordpress/ to get back into the wordpress admin screen for the site. I assume there are other places I need to make this change so that I can make all these admin items like pages, posts, comments, etc reappear too. What other files do I need to fix?

  3. pennywilliams
    Member
    Posted 3 years ago #

    someone please help me, I am desperate. I now can't get into the admin again, when I type the url for my login screen it saya page not found. DESPERATE!

  4. donuthole
    Member
    Posted 3 years ago #

    To be honest, I think this is an issue for a programmer. It looks like you'll need to make some changes directly to the databases to fix this issue. Do you have access to a cPanel or server interface (specifically, something like phpMyAdmin)?

  5. pennywilliams
    Member
    Posted 3 years ago #

    I actually just figured it out. I changing the site location out of the url/wordpress location to point directly to my url changed the page I needed to go to in order to log in (my host didn't tell me that this morning when they walked me through switching it over). My photos are still missing but that's probably because the /wordpress has been taken out of the structure, so I just need to go in and clean up internal links and photos I guess. If there's a way to batch fix all the photos, I'd love to hear about it!

    Thanks for the response donuthole!

  6. donuthole
    Member
    Posted 3 years ago #

    No problem. There is a batch way to do it through the PHPMyAdmin interface by running a "REPLACE" query. If you go to the posts table (usually wp_posts by default), you can update the links to the pictures with a SQL query (assuming your posts table is called wp_posts -- change it to the name of the table if not):

    UPDATE wp_posts SET post_content=REPLACE(post_content,'wordpress/wp-content/uploads','wp-content/uploads');

    It depends on how comfortable you are with SQL and how many posts/pages you have to update. If it's a lot of posts/pages, I would first export the table so I have a backup, and then run this query on wp_posts. If anything screwed up, you could always upload the backup and be right back where you were.

  7. keesiemeijer
    moderator
    Posted 3 years ago #

  8. andylesp
    Member
    Posted 2 years ago #

    pennywilliams: can you be more specific re: what you did with your domain site.. I have done the exact same thing and don't know what to do!

Topic Closed

This topic has been closed to new replies.

About this Topic