SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Location
    Cambs/Norfolk, UK
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question change all occurances of...

    I have had to move my wordpress to a different directory. Trouble is now all the images are not showing as they are still pointing to the old directory.

    Would I be able to enter some code to change all occurances of http://www.mysite.com/olddirectory/wp-content/uploads to http://www.mysite.com/wp-content/uploads ??

    I would presume this would then only change the beginning of the image place holder link?

    TIA
    Jill

  2. #2
    My precious!!! astericks's Avatar
    Join Date
    Mar 2002
    Location
    Vancouver, BC
    Posts
    1,971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I'd suggest using a symbolic link. It will point all request of olddirectory/wp-content-uploads to /wp-content/uploads

    Code:
    ln -s [path]/wp-content/uploads [path]/olddirectory/wp-content/uploads
    Above command will create a symbolic link to the folder you want.

    [path] is your full server path. /var/www/vhosts/ etc etc...Ask your host tech support if you dont know what it is.

    I do this through command line through ssh access (I am unsure if there are any FTP programs that do this for you). If you dont have such access, I'd suggest asking your host tech support to help you out.

    I hope this helps (and I'm right).


    edit: so, basically...you a enot altering the database, but asking the server to re-route the requests.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Location
    Cambs/Norfolk, UK
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm, thank you my precious, you're mine, you're all MINE!

    I shall look into that, not sure at the moment how it works but will put my thinking cap on!!!

    Cheers
    Jill


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •