Have now tried it x3 times but using it as a ‘setup on a new subdomain’ This works as expected but then it fails with the copying of the WP files & folders it’s looking for wp-cli.phar
So I get the following, and wp-cli.phar is present in none of the ‘parent’ directories so even though it fails the subdomain has the ‘Famous 5 Minute Install’ rather than the ‘clone’
Flushing object cache ..
.. done
Creating database dump for clone ..
.. done
Copying files to clone ..
.. done
Restoring database into clone ..
.. error : could not open input file: /home/user/domains/subdomain.example.com/public_html/wp-cli.phar
Configuring clone settings ..
Updating site name ..
.. error : could not open input file: /home/user/domains/subdomain.example.com/public_html/wp-cli.phar
Updating site URL ..
.. error : could not open input file: /home/user/domains/subdomain.example.com/public_html/wp-cli.phar
Updating home URL ..
.. error : could not open input file: /home/user/domains/subdomain.example.com/public_html/wp-cli.phar
Deactivating maintenance mode ..
.. done
.. done
.. failed
Should be reproducible on MY system but interested to know if others are seeing this and it’s indeed a showstopper for me.
I also get the following via ‘Manage WebApps’ for the cloned site:
I hade the same issue. A plugin in WordPress was creating the issue: BBQ Firewall. It is based on 7G / 8G firewall, so the htaccess might be the issue too. I couldn’t figure out which rule so far. Maybe it might apply to your case too.
That’s really odd. It worked just fine for me, e.g.:
Creating clone under new sub1.debian12-pro.virtualmin.dev virtual sub-server ..
Creating new sub-server for clone ..
Saving server details ..
.. done
Creating home directory ..
.. done
Adding records to DNS zone debian12-pro.virtualmin.dev ..
.. done
Adding to email domains list ..
.. done
Adding default mail aliases ..
.. done
Adding DKIM records to DNS domain sub1.debian12-pro.virtualmin.dev ..
.. added successfully
Creating Nginx virtual host ..
.. done
Starting PHP FastCGI server ..
.. done
Adding SSL to Nginx virtual host ..
.. done
Setting up log file rotation ..
.. done
Creating MariaDB database sub1 ..
.. done
Saving server details ..
.. done
Updating Webmin user ..
.. done
.. done
Flushing object cache ..
.. done
Creating database dump for clone ..
.. done
Copying files to clone ..
.. done
Restoring database into clone ..
.. done
Configuring clone settings ..
Updating home URL ..
.. done
Updating site URL ..
.. done
Updating site name ..
.. done
Deactivating maintenance mode ..
.. done
.. done
.. done
Switch to clone: https://sub1.debian12-pro.virtualmin.dev/
Could you provide more context about your WordPress instance? Did you install it via Virtualmin? Does the WP-CLI command exist in ~/bin or ~/public_html? What plugins do you have installed and enabled?
I go the issue on a ‘clean’ install of WordPress I will check again as I only have a few plugins installed but wp-cli.phar is NOT present on my installs.
Maybe one of the team or other users will be able to shed some light.
I installed via the Pro web apps panel. I’ll take a look at the plugins in a few minutes and post more detail. It’s a small install with a handful of plugins
root@manage:/bin# php wp-cli.phar --info
Could not open input file: wp-cli.phar
### WordPress Environment ###
WP Version: 6.7.2
WP Multisite: False No
WP Upload Limit: 256M
WP Debug Mode: False Disabled
The Main WP Directory: True Writable
The wp-content Directory: True Writable
The uploads Directory: True Writable
The plugins Directory: True Writable
The themes Directory: True Writable
### Theme ###
Name: OceanWP Child Theme
Version: 1.0
Author URL: https://oceanwp.org/
Child Theme: True
Parent Theme Name: OceanWP
Parent Theme Version: 4.0.6
Parent Theme Author URL: https://oceanwp.org/about-oceanwp/
### Server Environment ###
Server Info: Apache
Localhost Environment: False No
PHP Version: 8.1.2-1ubuntu2.20
PHP Memory Limit: 512 MB
PHP Post Max Size: 256 MB
PHP Time Limit: 180
PHP Max Input Vars: 1000
PHP Display Errors: False Disabled
MySQL Version: 5.5.5
Max Upload Size: 256 MB
PHP XML: True
MBString: True
SimpleXML: True
Fsockopen/cURL: True
SoapClient: False Your server does not have the SOAP Client class enabled - some gateway plugins which use SOAP may not work as expected.
DOMDocument: False Your server does not have the DOMDocument class enabled - HTML/Multipart emails
and also some extensions
will not work without DOMDocument.
GZip: False Your server does not support the gzopen function - this is required to use the GeoIP database from MaxMind. The API fallback will be used instead for geolocation.
Zip Archive: True
Iconv: True
HTTP Requests: True
Communication with oceanwp.org: True
### Active Plugins (9) ###
Elementor: by Elementor.com – 3.28.1
Ocean Custom Sidebar: by OceanWP – 1.1.3
Ocean Extra: by OceanWP – 2.4.5
Ocean Gutenberg Blocks: by OceanWP – 1.1.8
Ocean Modal Window: by OceanWP – 2.3.1
Ocean Posts Slider: by OceanWP – 2.0.9
Ocean Pro Demos: by OceanWP – 1.5.2
Ocean Stick Anything: by OceanWP – 2.0.8
Ocean Sticky Header: by OceanWP – 2.2.1
ls: cannot access '/home/xxxxx/bin/wp': No such file or directory
This output is su domain-user do I need to be root I am logged into WinSCP via root also I dont know if it’s important but these are subserver installations I am trying to clone?
For the domain in question, when you select it from the left menu and go to the “PHP Options” page, then click the PHP icon next to the PHP version—what does the page that opens show? Could you provide a screenshot?
Also, when using the File Manager module, again with the selected domain in question, do you see bin/wp? Could you provide a complete screenshot of the entire page if not?
Hi firstly thanks so much for the help and second I am sorry I reffered to this as a ‘bug’
When I carry out the 1st instruction it opens a phpinfo page showing php running as the domain user, I have just checked my other domains where WordPress is not installed and it shows the same eg PHP running as the domain user is that the expected behaviour?
With the file manager I can confirm wp is present in bin and the user:owner is domain user as above?
I was logged in as the master administrator account and have just noted that if I login as the virtual server user I have Master admin access, which should not be the case No?
No, if you log in as a virtual server owner, you must not have master administrator access. It would be helpful if you could share some screenshots, as the situation is unclear.
How did you install Virtualmin initially? Was it on a clean system? Did you make any custom modifications to users or domains outside of Virtualmin?
Well it was on a clean system and the ONLY change I made was to use Virtualmin to format & partition and mount a disk to my /home directory. I am going to take this as a lesson learnt and re-istall from scratch following this conversation as I would rather not post any identifiable info into a public forum and you have been more than helpful.
I MUST have done something but my normal procedure is to install / login and use Virtualmin to change my SSH port etc and then to add domains, honestly I only purchased PRO and setup a few days ago so it’s no huge issue and I can make substantive notes as I go.
Before I do would you consider taking a quick look if I sent you a PM? I understand thats a big ask but it may be something really staright forwrd I have done?
There was indeed a bug, @apidevlab! Thanks a ton for catching it. It’s been fixed and will be included in WP Workbench 1.0.7, as soon as @Joe has a moment to roll it out!