WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moving WordPress (38 posts)

  1. Craig
    Member
    Posted 1 year ago #

    Hi Everyone,

    Ok so I'm going crazy haha. Hopefully you guys can help.

    I'm trying to move a wordpress site i've built from one domain to another. I'm working with Dreamhost (who are really slow to respond and difficult to work with... not recommended)

    So i'm looking for a step by step guild to completely move the installation to work on another URL. If you wish to tackle this feat, please don't assume anything as I believed I'd gone through all the necessary steps but have been unsuccessful so far.

    For reference, here's what I did

    copied all the files in my ftp to my desktop
    backed up the sql database via phpmyadmin
    set up the domain on my server
    set up a new database on my server
    uploaded the files to the new domain on my server
    uploaded the sql backup on my new database
    changed my config file to point to the new database
    add 'defines' to update the urls of the wordpress installation.

    I've ran out of time by 4 days :-/ urgh. So any help would be greatful! Thanks!!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    See Moving_WordPress for step-by-step instructions.

  3. Craig
    Member
    Posted 1 year ago #

    thanks... this is what i attempted to follow.... twice :-/

    [No bumping. If it's that urgent, consider hiring someone.]

  4. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    Craig, I'm sorry you're having a tough time getting help :( If you want to share your domain, I can go take a look and see if this something easy we can fix or explain better what you need to do.

  5. Craig
    Member
    Posted 1 year ago #

    hi, thanks :) that would be great

    I have the site at museum.bigyetimedia.com and I'm after making the transfer over to jmaw.org.

    I've now actually locked myself out of museum.bigyetimedia.com by changing the site url in the backend of wordpress, and amending the config doesn't seem to be solving the issue.

    so now i'm really stuck... urgh :-(

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Remove the url lines in wp-config.php and try the functions.php method outlined in Changing_The_Site_URL.

  7. Ernie-C
    Member
    Posted 1 year ago #

    Hey Craig,

    It could be a few things. You may have transferred your .htaccess file from the old server to the new server and if your site was located in a subfolder you may have to make some changes to your .htaccess file. It should look like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Also, you can change the site url manually in the database by selecting the wp_options table and following these steps:

    1. Show 300 row(s) starting from record #0
    2. Check siteurl (option_id = 1) & home (option_id = 37)
    3. Click change (pencil) below the table rows
    4. Set both URL's to your new URL and click Go

    That'll fix the site URL issue. Let me know if you're still having the issue.

  8. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    museum.bigyetimedia.com and museum.bigyetimedia.com/wp-admin still work (and redirect correctly). I also peeked at your database, and it looked fine.

    jmaw.org is up and running WP on our servers, so I think what would be easier for you is if you do this:

    1) Log in to museum.bigyetimedia.com and change the Home and Site URLs to jmaw.org (this will break your site for a moment, don't panic!)

    2) FTP the files from museum.bigyetimedia.com to jmaw.org (they're on different shell accounts, so you can't just cp them over or change the SSH home, alas).

    3) We don't need to change the DB here. I mean, we could, but while you've got different shell accounts, it's all under the same owner (this is normal for us at DreamHost, you can make sub-users to let people do things like that without having access to your other sites, pretty cool!). As we say on the MySQL page on your panel, the DB server names are interchangeable :)

    If you wanted to rename the DB, go to https://panel.dreamhost.com/index.cgi?tree=goodies.mysql&amp; and edit the old DB for museum.bigyetimedia.com to something for jmaw.org, but this is totally optional.

    4) This is the tricky step. You need to search and replace your posts in the Database and change the URLs. There are two ways to do this: One is via phpMyAdmin, and the other is a plugin.

    If you check out our directions for how to install with DreamHosters, you can follow step 4 (and only that one!) - http://wiki.dreamhost.com/WordPress#Installing_with_DreamHosters

    It has pictures which I hope will explain better than words :D

  9. Craig
    Member
    Posted 1 year ago #

    ok so I went in to museum.bigyetimedia.com/wp-admin previously, changed the home and site url to jmaw.org. I then copied the files and use update_option('siteurl','http://museum.bigyetimedia.com');
    update_option('home','http://museum.bigyetimedia.com'); in the functions doc to regain control of the site... however I now can't log in to that site

    I'm also at a lost of what to do after I've uploaded the files to jmaw.org. I've just uploaded them. As i'm obviously missing a beat with all this, I feel a little weary changing the original database as I'm sure I'll do something wrong and lose the clients several hundred posts and twice as many images.

    So i'm currently locked out of museum.bigyetimedia.com and jmaw.org has the files copied from museum.bigyetimedia.com to my desktop to jmaw.org. Where do I go from here?

  10. Craig
    Member
    Posted 1 year ago #

    can't login to either actually :-/

  11. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    You can't have both of them using the same DB at once, that's just a nightmare all around :)

    Make sure the functions file on jmaw.org does not have the site and home URL options in there, first of all.

    What happens when you go to jmaw.org/wp-admin and try to log in?

  12. Craig
    Member
    Posted 1 year ago #

    Hi Mika,

    So i've just double checked that theres no home and site amendments in the config or functions files for jmaw.org.

    when i attempt to login to jmaw.org/wp-admin it actually just takes me over to museum.bigyetimedia.com :-/

  13. Craig
    Member
    Posted 1 year ago #

    maybe it's worth me getting museum.bigyetimedia.com back working - ie being able to login wp with the users, and then begin again setting up jmaw.org with a detailed step by step guide i can follow by you guys :)

  14. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    when i attempt to login to jmaw.org/wp-admin it actually just takes me over to museum.bigyetimedia.com :-/

    Hmm. That would mean you didn't set the home and site URL correctly. And looking at your DB, I can see you did not :) Ernie-C mentioned the DB changes you might have needed, and he was right. I flipped them over for you.

    Try to log in now?

  15. ak.singla
    Member
    Posted 1 year ago #

    -- Hello Craig..

    Don't panic -- Until you have the old site up and running.
    You can always use that to start a new migrate.

    As I see -- in the first post - you listed the steps that you followed..
    They are right, you just missed one -- which is causing a redirect to previous domain.

    "Editing the .sql file"
    --
    I think you got what to do??

    If you're still in doubt ask again. I'm here - just busy with something.

  16. Craig
    Member
    Posted 1 year ago #

    hmm, yes i believe I didn't edit the sql file before uploading it to the new database.

    What would the process be for this?

    And would we know how to get my login credentials to work again on the original site, museum.bigyetimedia.com?

  17. ak.singla
    Member
    Posted 1 year ago #

    First of all --
    For new site --

    --- Drop the database from phpMyadmin. You don't need this data, this belongs to the old site.
    (You may only want to drop the database and NOT DELETE, as it is properly configured back in config.php file)
    -----------------------------
    Then -- Open up the .sql file -- and replace all the occurrences of the previous site -

    For example - - replace --

    http://www.previous-site.com ----------with ---- http://www.new-site.com

    Be sure to change the link till .com and don't include the backslash after that -- as this won't change those occurrences which don't involve a slash after them

    For this you can use a decent text editor like Notepad++.

  18. Craig
    Member
    Posted 1 year ago #

    hmm, I'm a little scared of playing around with the original database as I may cause a mess in there and delete all my clients work. Is this the only way?

  19. ak.singla
    Member
    Posted 1 year ago #

    This is surely a way. I don't know about others.

    -- You may want to use "Replace All" feature of text-editors to replace those links.

    AS long as you have the old site up and running -- You're Safe.

  20. Craig
    Member
    Posted 1 year ago #

    oh i see.

    so i've just dropped the content in the new database that the new site referenced. Now, from the copy of the old database, I can open it up in a text editor, change the urls and upload it to the new database. That correct?

    So then the side problem is, I started the process that the wordpress help files suggest for 'moving wordpress' and changed the site and home url in wp on the original site. Now, even with adding 'defines' etc in the config file updates in the functions file, I'm still unable to login; my old user name and password doesn't allow me access. How do I get around that?

  21. ak.singla
    Member
    Posted 1 year ago #

    Well that's correct for the .sql file.

    I didn't get when you say --

    changed the site and home url in wp on the original site. Now, even with adding 'defines' etc in the config file updates in the functions file, I'm still unable to login; my old user name and password doesn't allow me access. How do I get around that?

    Check the URL of the login screen of the new site. Is it the same as "museum..." ??

  22. Craig
    Member
    Posted 1 year ago #

    it seems yes.

    When i try login to http://www.jmaw.org/wp-login.php it flashes and refreshes to http://www.museum.bigyetimedia.com/wp-login.php. And when I try then to login to http://www.museum.bigyetimedia.com/wp-login.php it doesn't redirect, but doesn't allow me access either :-/

  23. ak.singla
    Member
    Posted 1 year ago #

    As I see the log in screen and site urls are all right, you need to perform the sql move.

  24. ak.singla
    Member
    Posted 1 year ago #

    That is the issue. -- It is redirected back to old site.

  25. ak.singla
    Member
    Posted 1 year ago #

    You may want to skype me. ak.singla47

  26. rmfurqan
    Member
    Posted 1 year ago #

    can some one tell me how to fix this error??

    Warning: date() expects parameter 2 to be long, string given in /home/lennox/public_html/wp-content/themes/johnlennox/page-events.php on line 62

    Warning: date() expects parameter 2 to be long, string given in /home/lennox/public_html/wp-content/themes/johnlennox/page-events.php on line 63

    code is

    $endday = date( 'D',$custom_fields['wpcf-eveend'][0] );
    $enddate = date( 'd',$custom_fields['wpcf-eveend'][0] );

  27. Craig
    Member
    Posted 1 year ago #

    ok

    I'm not quite following you on

    As I see the log in screen and site urls are all right, you need to perform the sql move. That is the issue. -- It is redirected back to old site.

    What do I need to do to 'perform the sql move'

  28. ak.singla
    Member
    Posted 1 year ago #

    ahh - by that I mean -- that change the .sql file for the site names, and import that file into new database.

    You're not far away, what you need to do.
    Just don't panic and carefully read this thread.
    You may find the solution.

    I am available on skype for any help: ak.singla47

  29. esmi
    Forum Moderator
    Posted 1 year ago #

    @rmfurqan: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem is completely different.

  30. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    ak.singla - Be VERY careful here. Craig is using the exact same DB for the new site and the old one. He didn't need to move the DB since it's on the same server.

    Craig - You don't need to move the DB unless you want to have a second one. Before ak.singla stepped in, I had resolved the issue with http://www.jmaw.org/wp-login.php redirecting for you, but I guess you missed that in the other messages.

    If you'd like, I can make that change for you and you can try to log in again.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags