A
A
Alexey Bogdanov2016-02-10 15:10:15
WordPress
Alexey Bogdanov, 2016-02-10 15:10:15

Am I doing the site transfer to Wordpress correctly?

I need to transfer a site from Denwer to hosting with a change in the site name and structure.
In Denver, the site was named "test-sitename".
For hosting, I transfer the site to a third-level domain, i.e. the site name also changes (it will be like "sitename.domen.ru") and the folder structure.
I re-read several instructions and did the transfer according to the following algorithm:
1. Made a database export in Denver;
2. Created a new database on the hosting;
3. Through phpmyadmin on the hosting, I made the import of the database;
4. In phpmyadmin, in the wp_options table in the siteurl line, I changed the old site address to the new one;
5. Using FileZilla, I copied all the files from Denver to the hosting into the site folder;
6. Edited the wp-config.php file;
7. In the admin panel of the new site, I changed the old site address to the new one in the settings.
Result: the site has been moved, but the pictures, the logo do not work , and some links still lead to localhost... I.e. when the database is transferred, the old links leading to Denver remain somewhere in it.
I found tips on Google that I need to make 3 SQL queries in turn through phpMyAdmin:

UPDATE wp_options SET option_value = REPLACE(option_value, 'http://wp.ru', 'http://newsite.ru') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = REPLACE(guid, 'http://wp.ru','http://newsite.ru');

UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://wp.ru', 'http://newsite.ru');

But it did not help.
Then, in the old database, which I exported from Denver using Notepad ++, I stupidly auto-replaced the old Url with the new one, and then re-did all the steps to import the database and transfer everything else. Everything worked great! The only question is, is this correct?
Is it possible to do so?
In the same Google, on some resource, there was a statement that this could lead to problems, because. Wordpress uses serialization, but there were no explanations for what problems, what kind of serialization.
Please explain, otherwise you don’t want to return to problems in the future, when the site grows, which are better to avoid or can be eliminated now.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mr Crabbz, 2016-02-10
@Punkie

Forget about manual transfers. Install the Duplicator plugin and don't worry.

E
Evgeniy, 2016-02-10
@eZhrv

As with karenjan , there has never been a problem with serialized data.
As a rule, we are talking about the serialize function, with which you can store data arrays in string form.
An example of a serialized array: codepad.org/Iy0vpVOf
Somehow I used the plugin https://wordpress.org/plugins/wp-migrate-db/ which, judging by the description, works with serialized data:
But it did not bring obvious benefits for me, so I have not used it for a long time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question