Forums

moving wordpress to another forlder on the same server (3 posts)

  1. zoza
    Member
    Posted 5 months ago #

    Hi,
    I was running a wordpress blog for a festival at this address:
    http://na.pravi.me
    on a server to which I have ssh access.
    Yesterday I wanted to move it as a whole to a new folder and install a new instance of wordpress for the next year's edition of the festival.
    Fist, I created the folder where I wanted to move wordpress, then after quickly checking some instructions, I went to my wp-admin settings and changed WordPress address and Site address to http://na.pravi.me/belgrade011 where I wanted to move it. I also copied the complete worpdress folder into this new folder. However, I didn't follow the instructions fully to also change media links etc, so what happens now is that the site displays without css and media, but it does work
    The problem is - I cannot access my wp-admin any more, namely when I try
    http://na.pravi.me/belgrade/wp-admin it gives error 404,
    when I try the old one (which still exists on the same location on the server)
    http://na.pravi.me/wp-admin
    it redirects to http://na.pravi.me/belgrade011/wp-login.php?redirect_to=http%3A%2F%2Fna.pravi.me%2Fwp-admin%2F&reauth=1
    and I cannot access it to change it back/forward/anywhere.

    I tried editing DocumentRoot in apache settings to the new folder location or letting wordpress redirect it only, but both ways it doesn't work. Getting a bit lost....

    Can someone please give me advice what is best to do here?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 5 months ago #

  3. zoza
    Member
    Posted 5 months ago #

    Hi again,
    In the meantime I restored the URL to its previous state, using mysql prompt (http://www.pantz.org/software/mysql/mysqlcommands.html)
    and instructions found here
    http://www.coolestguyplanet.net/updating-wordpress-mysql-database-after-moving-to-a-new-url/

    UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

    UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

    UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

    The old site it moved to a new folder now and I would appreciate advice on how to render it also visible (it is not a separate wordpress install, for now it is just a copy linked to the same database; i do have a backup of it)
    thank you
    zoza

Reply

You must log in to post.

About this Topic