WordPress.org

Forums

[resolved] Old pictures not showing (22 posts)

  1. burpexcuzme
    Member
    Posted 3 years ago #

    My old pictures are gone! I have no idea where they went, and I only realized it when a reader mentioned it to me. The strange thing is that I can see the pictures--but anyone who is apparently not signed into wordpress (or my blog?) can't see pictures from old posts back in 2008 and 2009. When you click on the boxes, you are directed to a 403 permission alert page.

    I signed out and clicked on my old posts from 2008 and 2009, but a lot of posts show a blank box for the pictures. What is going on? I think it has something to do with the fact that I transferred my content two times: one from blogspot to wordpress, the other to a hosting site, Bluehost.

    My blog is picture-heavy, so it's quite distressing that all my old posts just show blank slates for pictures (the written content are all intact, though).

  2. Krishna
    Volunteer Moderator
    Posted 3 years ago #

    I think it has something to do with the fact that I transferred my content two times: one from blogspot to wordpress, the other to a hosting site, Bluehost.

    Possibly. The images may still be having their old permalinks. Did you check for this in your database?

  3. burpexcuzme
    Member
    Posted 3 years ago #

    I'm not sure how to do that, and if it does still have the old permalinks, how do I change them without doing it manually?

  4. Krishna
    Volunteer Moderator
    Posted 3 years ago #

    Can you check your database and see if any of the links to old domains/links appear? If so you can use a search and replace function to do the job quickly and correctly.

  5. burpexcuzme
    Member
    Posted 3 years ago #

    Do I do that on wordpress dashboard or my Bluehost file manager?

    Sorry, I'm still kind of ignorant in this kind of stuff.

  6. bh_wp_guy
    Member
    Posted 3 years ago #

    burpexcuzme
    The first thing you want to do is backup your wordpress site database. This can be completed a number of ways, but the method I prefer is to export it directly from phpmyadmin. I know Bluehost does have phpmyadmin on their cpanel. Here's the basic process you could use:
    To Export a database in phpMyAdmin:
    1.Login to your bluehost control panel
    2.Under the category "Databases", click on phpMyAdmin and login if it asks you to
    3.On the left column, select the database name you wish to export to
    4.Along the top of the screen click the "Export" tab
    5.Press Go button at bottom right.

    This should download a copy of the site database to your computer so that you have a backup before making changes inside it.

    If the issue is due to the links that are being used to display the images then you could try using a plugin like this one:
    http://wordpress.org/extend/plugins/velvet-blues-update-urls/

    This will do the basic search and replace function that you need.

    If that doesn't work it could potentially be an issue related to file/folder permissions, or hotlink protection of some kind.

  7. burpexcuzme
    Member
    Posted 3 years ago #

    Thank you for the advice.

    I used the plugin, but it seems to have destroyed all images from previous wordpress.com posts. I'm so devastated right now! I used the plugin to change url with burpandslurp.files.wordpress.com to burpandslurp.com posts and now all old wordpress.com images are not showing. Instead, when I click on an image, it says: "You 404’d it. Gnarly, dude."

    Could it be because the images are now stored on a different folder? For example: I click on an image that is working, and the url is: http://burpandslurp.com/wp-content/uploads/2012/05/0373a7275487_E63A/_DSC3373.jpg

    While when I click on an image that is not working, it gives me: http://www.burpandslurp.com/2009/10/img_0845.jpg

    How do I change this? My understanding is that once you use that plugin, it's irreversible. So confused! :-(

  8. bh_wp_guy
    Member
    Posted 3 years ago #

    Hello.
    You did create a backup of the database fist right? If you did, then you can restore the database and that will reverse the changes made by the plugin.

  9. burpexcuzme
    Member
    Posted 3 years ago #

    Yes I did! :)

    I have a question: after I did the backup, I have a sql file on my computer's download file. When I try to open it, my Macbook says there is no application to open it. That doesn't mean I backup-ed wrongly, right?

  10. bh_wp_guy
    Member
    Posted 3 years ago #

    Perfect.

    No, you did the backup right. the .sql file is just not recognized as a usable file by your computer, but it is usable by the server. Try this for the restore. (this will revert your posts, pages, and changes made by that plugin back to what things were at the time you downloaded the .sql file)

    To import a database:
    1) Login to your hosts cpanel
    2) On the main cPanel page click on PHPMyAdmin.
    3) Select the database name on the left column.
    4) Click on "Import" at the top of the page
    5) Next to "Location of the text file" click on "Browse" and choose the .sql file to import.
    6) Without changing any options shown, click "GO"

    Restore complete. Now for the wordpress.com images that aren't showing:

  11. bh_wp_guy
    Member
    Posted 3 years ago #

    Checking into the initial issue with the images. It looks like your old images are still hosted on your wordpress.com site. This is not a bad thing really, but it appears you have the wordpress.com admin --> privacy settings setup to make the site private and that may be what is causing the 403 error when you visit the image URLs:
    http://burpandslurp.files.wordpress.com/2009/10/img_0845.jpg (guessing this is one of the URLs)

    -- it shows the permission denied because the site is set to be private. This appears to be protecting the images from being viewed on the web, and on your wordpress.org site hosted on bluehost.

  12. burpexcuzme
    Member
    Posted 3 years ago #

    Yes, I figured that much about the images AFTER I did the url change. I'm an idiot!

    I'm having trouble right now with the backups...file is too big! I compressed it into a zip file but it's still too big, apparently.

    By the way, thank you so much for helping.

  13. bh_wp_guy
    Member
    Posted 3 years ago #

    If the file is very large then you may need to ask your host support for help in importing it though SSH. Their live chat is open right now. Give them a holler: http://www.bluehost.com/cgi/chat

  14. burpexcuzme
    Member
    Posted 3 years ago #

    I'm trying their SSH, but how do I enter a SSH command?

  15. bh_wp_guy
    Member
    Posted 3 years ago #

    If they helped you to login to SSH then you will first want to make sure you have your .sql file uploaded to the server with FTP.

    From there you can use a command like this:
    mysql -u database_username -p database_name < sqlfile.sql

    to import the database. It will ask for the password after you press enter, then you just enter your password and press enter again.

    If you need them, the database, username, and password should show up in your wp-config.php file for your wordpress site.

  16. burpexcuzme
    Member
    Posted 3 years ago #

    This is what I have on Terminal right now:

    Last login: Sat Aug 4 21:56:49 2012 from 108-192-190-211.lightspeed.irvnca.sbcglobal.net
    burpands@burpandslurp.com [~]# mysql -p -u username database_name < file.sql
    -bash: file.sql: No such file or directory
    burpands@burpandslurp.com [~]# mysql -u database_username -p database_name < sqlfile.sql
    Enter password:
    ERROR 1045 (28000): Access denied for user 'database_usernam'@'localhost' (using password: YES)
    burpands@burpandslurp.com [~]# mysql -u burpands -p burpands_wrd1.sql < sql.file.sql
    -bash: sql.file.sql: No such file or directory
    burpands@burpandslurp.com [~]#

    What am I doing wrong?

  17. burpexcuzme
    Member
    Posted 3 years ago #

    I already did enable SSH. Also I uploaded by backup into Bluehost file manager's home...was that right? I'm not sure I understand what it means to "upload into server."

  18. bh_wp_guy
    Member
    Posted 3 years ago #

    Should be something more like:

    mysql -u burpands_wrd1 -p burpands_wrd1 < [replace sqlfile.sql in my example with the path to your .sql file that you uploaded to the server through FTP]

    As long as the username and password are correct that should work

  19. burpexcuzme
    Member
    Posted 3 years ago #

    I'm stuck here again:

    burpands@burpandslurp.com [~]# mysql -u burpands_wrd1 -p burpands_wrd1 < /home1/burpandsEnter password:
    ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.
    burpands@burpandslurp.com [~]#

  20. bh_wp_guy
    Member
    Posted 3 years ago #

    ok that last part doesn't have your .sql file name specified. -- If the .sql file was uploaded into the home folder of your account then you need to specifly only this in the filename part:

    ~/filename

    So the full command would be:
    mysql -u burpands_wrd1 -p burpands_wrd1 < ~/filename.sql

    of course you would replace filename.sql with the actual file name of your .sql file.

  21. burpexcuzme
    Member
    Posted 3 years ago #

    YES!!!! It worked!!!!!!!

    Thank you thank you thank you!!!!!!!! You're awesome!! I cannot thank you enough for all your patient help. I truly appreciate it!!

  22. bh_wp_guy
    Member
    Posted 3 years ago #

    Hooray! Good work, and no problem.

Topic Closed

This topic has been closed to new replies.

About this Topic