M
M
Maxim2016-09-02 19:17:30
linux
Maxim, 2016-09-02 19:17:30

Reinstalling a WordPress site on another VPS on LEMP - how to solve the problem?

Disclaimer: I'm not a "programmer" with VPS, Ubuntu, etc.
except for "You", I only recently learned how to install LEMP and Wordpress on VPS according to the instructions of Digital Ocean and Vultr :) point io). Then I got so worn out with all this that I did everything through the root user, then I created a sudo user and deleted root, so then there were constant problems with setting up the site.
Now I want to put the site on a normally configured LEMP (according to DigitalOcean's instructions), I did it, but I can't migrate the site to another server (I created a new droplet on the same Vultr), the domain is the same.
So:
1. I backed up the site using the All in One WP Migration plugin (including databases).
2. Set up a new LEMP and installed WordPress (everything worked out well).
3. I tried to import the backup via All in One WP Migration, changed the DNS records on the server and domain. As a result, it turned out that I could not enter any admin panel, and the site did not open on both servers. It turned out that site.com/wp-login.php opened on my domain, the admin data came up only from the admin on the Previous server, they didn’t fit from the newly created one. Error 500 "Unable to access site" after login.
4. After adding

define('WP_SITEURL', 'http://мойдомен.com');
define('WP_HOME', 'http://мойдомен.com');

in config.php, I was able to successfully log in to mydomain.com/wp-login.php by entering the old admin credentials, after which this window appeared 744df3090e794a04b4bf643e864893e7.JPG
: after entering the data of the Old admin (he doesn’t find a new one anymore), only this comes out: 93808a2cb896482295d8ca2cdbac8e08.png
When you enter mydomain.com, this comes out: 91c389da134d472b862edc6aeb057156.png
at which the IP of the OLD server is displayed, and not the new one.
Now I don’t know what to do anymore, I can run the Easyengine script again and restore the site calmly, but I want to set up my LEMP well. Personally, I have suspicions that something needs to be registered in MySQL or in Nginx, or maybe both. But I don't know what...
Please help, I'm even ready to give a reward for help. If you need more information, I'll provide it.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maxim, 2016-09-03
@arangutang

Thanks everyone, I solved the problem!
I restored the site through the easynginx script, my intuition "pulled" to remove the w3 total cache plugin after I made a database backup and a full backup through the Duplicator plugin. I set up a new server and restored the site through duplicator. At first there were problems, with the same error 500, but I tried to add "update_option('siteurl',... and 'home' to my domain (after changing the dns records) and everything worked out.
Today I configured the w3 total cache plugin and imported the settings from the previous site and got the 500 error again.
And now I understand what the problem was, the Easyengine script turns out to install memchache on the server, but I haven’t installed it manually on the new server yet, and due to the automatic import of w3 total cache settings in which the memcache cache is configured, this problem was caused !!!

D
Denis Yanchevsky, 2016-09-02
@deniscopro

It might be worth trying the Duplicator plugin for site migration . It usually doesn't cause problems. It creates an installation package that will need to be deployed to a new server by running the installer.php file, which is also generated by the plugin.
Regarding the 500 error. This is a server error and the reason should be reflected in the server error log (error.log).

D
Dmitry, 2016-09-02
@LazyTalent

Most likely, you need to change the values ​​​​in the database in the wp_options table.

D
Dmitry Aitkulov, 2016-09-03
@Scarfase1989

and the old data remained before the migration to the new VPS? if so, then copy the entire folder with the site to the new VPS and backup the database using mysql. Then copy the files to the new VPS and restore the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question