• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Wordpress website migration issues

Chris1

Regular Pleskian
Hello,

--Problem 1--

I've been having this issue for a while but I keep working around it. I've decided to post the issue on this forum to see if other people have the same problem.

I'm moving some websites from a Plesk 10 server to a Plesk 12.5 server, these websites are made using Wordpress.

After migration to the new server. the site name is automatically changed back to the default name of My CMS. Why is this happening?

My workaround to fix this is this:

  1. Click on the "WordPress" application for this website in "Websites & Domains".
  2. Click "Change Settings".
  3. Adjust site name to the correct name.
--Problem 2--

If a customer develops a new website in a sub-directory such as example.com/dev but then later wants to move this website to example.com. I search and replace all occurrences of "example.com/dev" to "example.com" and move the website files to the root directory.

The problem with this is the Wordpress application Plesk still states that the install path is "http://example.com/dev". How can this be updated?
 
--Problem 2--

If a customer develops a new website in a sub-directory such as example.com/dev but then later wants to move this website to example.com. I search and replace all occurrences of "example.com/dev" to "example.com" and move the website files to the root directory.

The problem with this is the Wordpress application Plesk still states that the install path is "http://example.com/dev". How can this be updated?

For me the easiest way to migrate Wordpress site is manually.
if I have dev site on http://example.com/dev (personally I prefer http://dev.example.com)
1. Install clean wordpress on http://example.com/
2. Copy all content from http://example.com/dev/wp-content to http://example.com/wp-content
3. Download the database of http://example.com/dev
4. Open the downloaded database with n++ find and replace all http://example.com/dev with http://example.com
5. Upload the modified database to http://example.com/
6. Open the wp-config in http://example.com/ and replace the database prefix with the new one from point 5.
7. If everything is fine with the new site, remove the database tables from http://example.com/ which are originally created on wp install on point 1 (they have the prefix name which you changed in wp-config in point 6)

It may look complicated in the beggining, but the proces is easy and no plugin or somthing else is required
 
@bulent,

There are easier ways of migrating the WordPress instance:

1) install a complete new WP instance,
2) install an appropriate plugin (multiple WP plugins are possible, choose one that migrates content and media files at the same time),
3) use the plugin to migrate data,

and that is it. About 30 seconds to 2 minutes work.

Anyway, this does not actually solve the problems of @Chris1 (and many others).

Regards...
 
@Chris1,

In essence, you have two problems that have similar solutions.

I will address problem 2 first.

The problem with this is the Wordpress application Plesk still states that the install path is "http://example.com/dev". How can this be updated?

In the central "psa" database, there are three WordPress (henceforth: WP) related databases.

In short, do the following:

a) go to "Tools & Settings > Database servers" and click on the button to open the DB Webadmin/PhpMyAdmin web interface,

b) go to the psa database and browse to page 5: click on the table WordpressInstances and look for the row containing the specific WP instance,

c) change the value to: /httpdocs (if your WP instance has been moved to the root directory, otherwise use /<subdirectory>)

and that is all.

Note that when having changed the value in point c, everything is good, but it can be the case that you have to do a refresh of the WPT page in the Plesk Panel.

Note that you actually have done something "strange", given the text below

If a customer develops a new website in a sub-directory such as example.com/dev but then later wants to move this website to example.com. I search and replace all occurrences of "example.com/dev" to "example.com" and move the website files to the root directory.

In essence, it is not necessary to do a lot of URL changing: just do the following

a) go to the database of the specific WP instance and open it in DB Webadmin/PhpMyAdmin,

b) open the table "options" (or "<prefix>_options") and change the URLs for option_id 1 and 2: siteurl and home (note that they have to be identical, other issues will occur)

and that is it, WP will do the rest.

By the way, if you also want to change the name of the site (for instance, from My CMS to something else), that can also be done in the "options" table, by simply adjusting the value for option_id 3: blogname (and, again, WP will do the rest).

Hope the above helps!

Regards.....

PS In general, it is good to refresh WPT cache after most changes to a WP instance, one way of doing that is to do a scan for WP instances with the WPT tool in Plesk. If you do not have WPT, well, then there actually is no need to flush cache, except for those caches used by WP Plugins. In any situation of changes to WP instances and the presence of WP plugins that are intended to cache something, there is always a need for flushing all caches, including those of the WP plugins.
 
Hello @bulent & @trialotto

Thank you for your replies. For some reason i never thought of installing a fresh WP instance when moving from a development sub-directory to the root directory, I will do this from now on.

By doing this it should resolve the problems I have when using the Plesk migration manager.
 
@Chris1,

There are two things to distinguish:

1) move of an existing WP instance in a subdomain or a subdirectory to another domain or directory, all on the same server: see my solution for your problem 2 (and other tips), (and)

2) migration between servers of WP instance(s): the most easy methods are

a) simple transfer (via rsync) of the entire contents of the directory for the WP instance AND exporting a SQL dump, in order to import the dump (i.e. the entire dbase) on the new server
b) using an appropriate WP plugin (there are many, be careful in selecting a proper one, before you end up with a bad coded, often paid-for plugin)

and with that distinction in mind, one can always copy OR migrate a WP instance easily.

Note the WP can be annoying due to the fact that it is database driven (very odd for a CMS), but that does make copying/migration a lot more easy (and less time consuming).

Regards...
 
@trialotto

Surely when moving between servers and to move bulk accounts, the Plesk migration tool would be better.

Ehm, no, at this moment it is not. The Plesk Migrator (Plesk 12.5.30) has some issues when migrating WP instances that have been managed by WPT.

Still work in progress......but sooner or later, the migration issues concerning WP instances will be absent, I assume.

Regards....
 
@Chris1,

If you need a quick solution, just start a (personal) conversation: I have a quick and very able tool for migration of content, database and media files.

Regards.....
 
In short, do the following:

a) go to "Tools & Settings > Database servers" and click on the button to open the DB Webadmin/PhpMyAdmin web interface,

b) go to the psa database and browse to page 5: click on the table WordpressInstances and look for the row containing the specific WP instance,

c) change the value to: /httpdocs (if your WP instance has been moved to the root directory, otherwise use /<subdirectory>)

How can I find the domains subscriptionID? I'm not sure which entry in the table this domain is.
 
@trialotto

Because the domain is not specified in the WordpressInstances table, only subscription ID and there are a lot in there. It is unclear which domain is which.
 
Back
Top