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.
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.
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
Comments
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?
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.
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..
Haven't tried this yet.. I'll try it later. Thanks!
as pointed out above, check if table prefix is correct
Yep, prefix is the same.
recheck if the the database is properly imported.
Any url?
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.
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!
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.
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.
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.
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/
You can also export WP to XML and import in the new install.
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
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.