Wrong ai1wm-backups path when moving from Windows server to macOS
-
When moving a site from a Windows (IIS) server to (my local) macOS server I have the following issue:
Normally the
ai1wm-backups
directory is inside thewp-content
directory which on my machine is in thepublic_html
directory.When I restore an ai1wm backup created on the Windows IIS machine I get the following situation:
A directory with the (literal) namewp-content\ai1wm-backups
is created in thepublic_html
directory. So I get a directory with a backslash in the directory name.I did some research and found that the ai1wm-backups location is taken from a setting in the WordPress database. On windows, the default directory seperator is
\
where on macOS and Linux it’s/
.When I manually replace all \ to / in the database backup path all works as expected.
The relevant code is in the
constants.php
file on the line where theAI1WM_BACKUPS_PATH
constant is defined.I have not tested this, but perhaps calling the PHP function
realpath()
fixes the issue.
- The topic ‘Wrong ai1wm-backups path when moving from Windows server to macOS’ is closed to new replies.