Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to customize the WordPress URL that is shown in WordPress Toolkit?
For example, change the URL from http://example.com to https://example.com.
Answer
The WordPress URL is configured in the WordPress Toolkit database. To customize it, follow these steps:
-
Connect to a Plesk server via SSH.
-
Create a backup of the WordPress Toolkit SQLite database:
# cp -p /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3_back
-
Connect to the sqlite3 database:
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
-
Find the ID of the WordPress instance for example.com domain. In the example below the ID is 168:
MYSQL_LIN: sqlite> SELECT instanceId ,name, value FROM InstanceProperties where name='url' and value like '%example.com%';
168|url|https://example.com -
Update the URL:
MYSQL_LIN: sqlite> update InstanceProperties set value='https://example.com' where name='url' and instanceId=168;
Now, when you click Log in in WordPress Toolkit, https://example.com/wp-login.php will be opened instead of http://example.com/wp-login.php.
-
Connect to a Plesk server via RDP.
-
Create a copy of the file wp-toolkit.sqlite3 located in %plesk_dir%var\modules\wp-toolkit.
-
Start Windows PowerShell and run the command below to connect to the WordPress Toolkit SQLite database:
PS &$env:plesk_dir\admin\bin\sqlite3.exe $env:plesk_dir\var\modules\wp-toolkit\wp-toolkit.sqlite3
-
Find the ID of the WordPress instance for example.com. In the example below the ID is 168:
PS sqlite> SELECT instanceId ,name, value FROM InstanceProperties where name='url' and value like '%example.com%';
168|url|http://example.com -
Update the URL:
PS sqlite> update InstanceProperties set value='https://example.com' where name='url' and instanceId=168;
Now, when you click Log in in WordPress Toolkit, https://example.com/wp-login.php will be opened instead of http://example.com/wp-login.php.
Comments
6 comments
This is hardcore way.
Better solution seems to be https://support.plesk.com/hc/en-us/articles/360003252194-Is-it-possible-to-rename-wp-login-php-file-in-order-to-change-the-Login-URL-
Hello @tomaz!
These articles have a different purpose: this one explains how to change access to URL from HTTPS to HTTP and the article you gave the link to explains how to use file different from wp-login.php to log in.
Hello all,
Is there a way to renane a url without ssh? Every time tis happens i have to wait untill my server guy is up. Is there a setting i misd from the Wordpress toolkit?
Hello @Mike de Leeuw!
There is a way to perform the change described in the article, but for that, you should have access to the Plesk interface under 'admin' user (or additional administrator account). If you don't have such access, then you cannot perform the change on your own and you have to ask the server administrator to do it.
When logged into Plesk as admin, you can change the URL as follows: go to Tools & Settings > Scheduled Tasks > Add Task and add the following command to the Command field:
sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3 "UPDATE InstanceProperties SET value='https://example.com' WHERE name='url' AND instanceId IN (SELECT instanceId FROM InstanceProperties WHERE name='url' AND value LIKE '\%/example.com\%')"
After that, click Run Now to execute the command.
Hello,
I have 2 Domains what are installed in a Subdirectory /blog, the WP Toolkit shows the domain.com/blog Url display a 404 instead of the Site Address. Tried the above command for 1 Domain, url was changed then to domain.com after refreshing, Toolkit picks again the site url with domain.com/blog ..
How to handle Domains in WP Toolkit when Wordpress Address and Site Address are different ???
Hello Chris,
The behavior when once modified WordPress Toolkit pick up old URL is not expected. Please, submit request to the support team providing as much details as possible and we will look into issue closer:
https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
Please sign in to leave a comment.