• Resolved stenberg

    (@stenberg)


    Hello.

    I got a problem with image uploading. At first when I created the webpage I wasn’t sure which program I would use, so I installed WP in a directory called “wordpress” inside the public_html. So at first my WP homepage was linked to by http://name.com/wordpress

    After that I decided to use WP for real, so I wanted to change it from the http://name.com/wordpress directory to just http://name.com

    This worked fine, except for the pictures.. I only had 4-5 example pictures at the moment as I am still just designing some and trying to find out what plugins I want to use, so I don’t want to spend time on getting info/pictures up. So the loss of these pictures were fine, well actually they are not gone. They try to link to http://name.com/wordpress/wp-content/uploads/2008/10/p6210094.jpg but if I just remove the /wordpress from that link, I can access them. So anyways, I can just remove them and add them again, but my problem is that the new pictures I add, get the link http://name.com/wp-content/uploads/2008/10/p1010415.jpg, so actually without the /wordpress (which is what I want), but in fact the picture is loaded into the very same link BUT with /wordpress, so the link to access the picture looks like this: http://name.com/wordpress/wp-content/uploads/2008/10/p1010415.jpg

    Perhaps I wrote it a bit messy.. but I hope you get the point. The trouble in short: I moved my page from name.com/wordpress to just name.com, and now the images I upload are uploaded on name.com/wordpress/picture-name (the same as before I moved the page), while in the online webpage, when I try to open the page, the link attempts to reach name.com/picture-name, and thus getting a “Error 404 Not Found” since the file is uploaded into the folder /wordpress (which I deleted after moving the webpage, but is re-created by the picture uploader).

    I don’t know if anyone already asked this and got help, but I really tried to find something first, if someone already asked this and the answer is anywhere, please just give me the link.

    Thanks on beforehand for any help you can provide me with.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter stenberg

    (@stenberg)

    Ok.. I thank myself, I solved it myself after looking at another guys problem where he was referred to change some settings in phpMyAdmin at your database (in my case, bluehost.com). It was not that hard.. had to go to page nr 2, find “upload folder” and change it from blahblah/wordpress/blahblah to just blahblah/blahblah.

    Hope this can help someone else with the same problem at least!

    This is the exact problem I am having. I am glad you figured it out, but I am having a hard time following your instructions. I get the blah blah part, but can’t find this nr 2 page.

    Does anyone know where there is a more detailed explanation? I’m not too familiar with databases, so this is a bit spooky.

    The descition is really a little hard to understand…

    In case you are using phpmyadmin you can do the following steps:

    1. Open phpmyadmin
    2. select the database associated with your wordpress blog. In case you don´t know the name of that database: Find wp-config.php in the root of you blog und locate the part where it says

    /** MySQL database username */
    define(‘DB_USER’, ‘THIS IS THE DATABASE NAME’);

    3. In the database select the table “options” or “wp-options”.

    4. click on edit (should be the first button-thingie)

    5. Find the field called “upload_path” (should be on the 2nd page, you have to skip forward using the little arrows)

    6. Click on edit.

    7. Change the upload path to the new one.

    Actually it should be possible to adjust this in wordpress itself….

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    It is possible to do it in WP. Look at Settings->Miscellaneous.

    However, that will only affect new images, not old ones. If you move the images, then all the links to them in the database will be wrong. You’ll need to do a search and replace in your database to fix the URLs.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Images upload wrong after changing WP’s directory’ is closed to new replies.