• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Resolved Error 500 after changing from temporary .plesk.page to a real domain

celebrir

New Pleskian
Server operating system version
Ubuntu 22.04.5 LTS
Plesk version and microupdate number
18.0.71_build1800250729.09
Yesterday I tried renaming one of the Wordpress websites from the temporary .plesk.page to a real domain using this guide.

Since then every access to the site runs in a "HTTP 500" error, with the logs showing an "Apache error" warning of:
AH01071: Got error 'PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/vhosts/nice-newton.***-***-***-***.plesk.page/httpdocs/wordfence-waf.php) is not within the allowed path(s): (/var/www/vhosts/demo.myexampledomain.com/:/tmp/) in Unknown on line 0; PHP message: PHP Warning: Unknown: Failed to open stream: Operation not permitted in Unknown on line 0; PHP message: PHP Fatal error: Failed opening required '/var/www/vhosts/nice-newton.***-***-***-***.plesk.page/httpdocs/wordfence-waf.php' (include_path='.:/opt/plesk/php/8.3/share/pear') in Unknown on line 0'
(IP redacted to ***-***-***-*** and domain redacted to "myexampledomain.com". The "demo." is the used subdomain)

It's not a certificate issue because I was able to update that successfully.

Reverting the changes to the .plesk.page domain made it work again.
I then tried changing the domain with the right hand side tool, with the same result:
1755954785273.png

Googeling for solutions I found some articles and forum posts, but none worked so far.
Reboots have been unsuccessful as well.

This site is currently a demo but will replace our production Wordpress installation in the future, so another domain change removing the "demo." subdomain will follow later this year.

All help is appreciated!
 

Attachments

  • 1755955011160.png
    1755955011160.png
    55.1 KB · Views: 1
  • 1755955214422.png
    1755955214422.png
    63.6 KB · Views: 1
Renaming a domain can cause issues, as you've already discovered, as some CMS/applications store the domain for use of fixed paths (among other things). This is, unfortunately, common practice on Wordpress. Often, a better method is to clone the website with help of the WP Toolkit in Plesk instead of renaming the domain.

I don't have an exact solution to solve this particular issue, as it can be caused by a variety of different settings in Wordpress, but I do have some suggestions you could try.

1) Uninstall/remove the Wordfence plugin
The error shows an issue with a file belonging to the Wordfence plugin. With a bit of luck simply uninstalling the plugin might solve your issue and help you regain access to your website.

2) Check the domain in the Wordpress options
If the first solution does not work, check the _options table in your Wordpress database to see which domain is set for the website. This might still be your old domain. Check values for the records with option_name siteurl and home. Change the values to your new domain/url if they still contain the old domain.

3) Change all references to the old domain in your Wordpress database
If the previous two suggestions don't solve your issue you can use an more elaborate approach and update every record which still references your old domain and replace it with your new domain. However, depending on your database/SQL skills, it might be faster and easier to try to last suggestion below.

4) Clone to website to a new domain
The Wordpress toolkit in Plesk has an option to clone an Wordpress website to a new (or existing domain). Cloning also updates (some) database refrences to the new domain. This usally saves a quite come hassle compaired to just renaming the domain.

Hope this helps.
 
@Kaspar
The Problem is solved now. The culprit was this WordFence WAF plugin alone.
They hardcoded absolute paths in the database AND files (httpdocs/.user.ini) .....

1) Uninstall/remove the Wordfence plugin
Uninstalling would have helped. Disabling did not help.

2) Check the domain in the Wordpress options
These settings were fine.

3) Change all references to the old domain in your Wordpress database
I had to do this by downloading a dump and then bulk replacing the domain string using MySQL Workbench. (Notepad++ would have done it as well)

4) Clone to website to a new domain
This did not work. It only allowed me to use an existing domain (The .plesk.site) which I did not want to use.
 
Back
Top