Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[Solved] wordpress migration to vps.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[Solved] wordpress migration to vps.

juanjuan Member
edited November 2012 in Help

I made a wordpress site hosted locally on my laptop, now I'm transferring them to a vps with nginx, php and mysql. I already imported the database to the vps and grant the wordpress folder's permission to www-data. I also have configured wp-config.php. But when i go the website/domain, It is showing the five minutes wordpress installation again. What did i missed? Thanks.

Thanked by 1Mridul
«1

Comments

  • kbeeziekbeezie Member
    edited November 2012

    You didn't correctly configure wp-config.php to point to the new database location, make sure the database host, username and password are correct for your new location. Also if the domain name isn't the same in the database you may need to edit the database for the domain name, or hard code it in the wp-config.php

  • seems pointing to a fresh database

  • Agree with @jcaleb , have you checked the database and wp-config.php? are they match? is the database imported correctly?

  • kbeeziekbeezie Member
    edited November 2012

    Well the other part to look at is the database prefix. if you used something other than the wp_ prefix, it's gona think the database is empty/new, even if the credentials matched.

  • What is the domain url?

  • www-data should not be the owner of any of the files or folders, if you need to, chmod them accordingly.

  • @mojeda said: www-data should not be the owner of any of the files or folders, if you need to, chmod them accordingly.

    This... group is fine, but the owner should not be www-data, you could have it as youruser:www-data so that you can control what the webserver/php does at the group-octal bit.

  • he might be fixing his config right now

  • Here's what i did in order:
    1. Export the mysql database from my localmachine
    2. Import the database to the vps using: mysql -p -u username database_name < file.sql
    3. Created new user and granted access to the database
    4. Configured wp-config.php:
    - DB_NAME
    - DB_USER
    - DB_PASSWORD
    - DB_HOST (localhost)
    - hardcoded WP_HOME and WP_SITEURL

    I already double checked the user and password and it's the same, plus to what i experienced if user or password is incorrect the error would be showing Can't connect to database or something..

  • @mojeda said: www-data should not be the owner of any of the files or folders, if you need to, chmod them accordingly.

    Haven't tried this yet.. I'll try it later. Thanks!

  • as pointed out above, check if table prefix is correct

  • @jcaleb said: as pointed out above, check if table prefix is correct

    Yep, prefix is the same.

  • recheck if the the database is properly imported.

    @jcaleb said: seems pointing to a fresh database

  • Sadly, changing the files and folders owner, didn't worked too. I just continued with the new installation, since it doesn't have posts yet, it used the same table and prefix though, weird. I'm planning to do this with joomla, so i hope i won't encounter the same problem.

    It's a private site, sorry. :D

  • SpeedBusSpeedBus Member, Host Rep

    Delete the install files / folder ?

    Ps, I haven't used wordpress in a while :/

  • Use something like https://myrepono.com/ (not affiliated). They have a trial account that lasted me about 5 months. This is what I use everytime I need to migrate wordpress sites. Its a plugin, very straightforward migration. I am sure there are other plugins similar to this but this is the one I tried and it works.

  • @juan try monitoring the MySQL queries to see what Wordpress is asking from the database? http://dev.mysql.com/doc/refman/5.0/en/query-log.html. Tail that log file and surf to your site....

  • @pavs and @craigb : These will all be useful for my next migration. Thanks a lot!

  • @juan said: I just continued with the new installation, since it doesn't have posts yet, it used the same table and prefix though, weird.

    1. Create new setup how you want.
    2. Run the installer on the new setup
    3. Install phpMyAdmin
    4. Open up the database in phpMyAdmin and delete all the tables inside, preserving the database name and the new user
    5. Import the backup SQL or paste it in as text
    6. ?????????
    7. DONE
  • The only 'reason' I can guess is a hardcoded prefix/query somewhere you messed with but have now forgotten.

    Regardless, what bamn said should work if you can be bothered. Or otherwise, log the queries - or use one of those plugins.

  • mikhomikho Member, Host Rep

    There is a import/export routine inside wordpress if I'm not mistaken.

    Meaning; setup new site, export content from your local, import into your new site.

  • JTRJTR Member
    edited November 2012

    Dump the local SQL DB, upload that to your VPS, create a NEW DB with NO tables, import your dumpfile, add your wordpress mysql user, upload all your wordpress files, make sure file perms/ownership is set right, and see if this fixed anything.

    Source: I've moved a handful of WP sites before like this.

  • @MikHo said: There is a import/export routine inside wordpress if I'm not mistaken.

    Import from Blogger and other CMS, I think

  • @juan

    you can try this nice plugin that takes care of all the hard work.

    http://wordpress.org/extend/plugins/duplicator/

  • @bamn said: Import from Blogger and other CMS, I think

    You can also export WP to XML and import in the new install.

    @JTR said: Dump the local SQL DB, upload that to your VPS, create a NEW DB with NO tables, import your dumpfile, add your wordpress mysql user, upload all your wordpress files, make sure file perms/ownership is set right, and see if this fixed anything.

    This.

  • Why does this seem overly complicated? All that need's doing is the same file content, the same database, same database name (especially if the username changed like user1_dbname to user2_dbname). I've transferred dozens and dozens of wordpress sites just fine and at best they've only needed the username portion of the wp-config.php changed in the database setting.

  • Just mysqldump the database, log into your VPS, reimport the database into MySQL then rsync the WordPress folder back.

    Very simple process.

  • I'm guessing his problem is very simple. We just don't have access and have a look

  • @jcaleb said: I'm guessing his problem is very simple. We just don't have access and have a look

    People holding back on information (or being extremely vague like it's gona damage them) tends to be the biggest reason simple problems are not easily resolved.

Sign In or Register to comment.