• 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.

How to change installation path of Wordpress application?

Umar2003

New Pleskian
Hello,
I have installed the Wordpress application. The wordpress url is "server.com/wordpress", but I want to change it to something like "server.com/myblog".
In Plesk, the installation path cannot be changed (at least, it is not under "Change Settings").
Changing the Wordpress installation itself is not that difficult (renaming the folder in httpdocs and changing the siteurl and home parameter in the database), however, in Plesk still the old installation path is shown, and the Plesk interface to Wordpress obviously does not work any more.

How can I change the Wordpress installation path in Plesk?
Thx, Umar

Version Parallels Plesk v12.0.18_build1200140606.15 os_Ubuntu 12.04
OS Ubuntu 12.04.5 LTS
 
Since I just finished wrestling with this myself, and this forum came up in my Google searches, I'm sharing my solution.

Note, this is on a Linux server.

As an admin user, at a terminal:

plesk db dump > PSA.sql
This creates a SQL dump, essentially a backup of your psa database.

Edit that (or a copy of it) looking for instances of "/wordpress" and "'wordpress'" in the following tables:

  • apsResourcesParameters
  • WordpressInstanceProperties
  • WordpressInstances
Remove the relevant parts, for instance:

(145,71,'urlPrefix','wordpress') becomes (145,71,'urlPrefix','')

(14,16,'/httpdocs/wordpress',0,14) becomes (14,16,'/httpdocs',0,14)
Pay special attention to string lengths in variables that look like this:
... s:19:\"/httpdocs/wordpress\" ...
so that your updated string would be:
... s:9:\"/httpdocs\" ...


Once your SQL file is duly scrubbed, import it back into the psa database thus:

plesk db < PSA.sql

To be satisfied that your update has worked, show one of the updated tables:

plesk db show apsResourcesParameters
The lines with "urlPrefix" should no longer contain "wordpress".


Log into Plesk, and go to Server Management -> Wordpress.

Click on a broken installation, to edit it. Click the "Refresh" button at the top of that page. The page should now show a proper Wordpress installation in the root instead of a sub-folder.

Share and enjoy!
 
Back
Top