DEV Community

Discussion on: How to unpack .wpress archive files created by the All-in-one-Wp-Migration Wordpress plugin

Collapse
 
erionbrace profile image
erionbrace

I use Windows

Thread Thread
 
ofhouse profile image
Felix Haus

Assuming the .wpress file you want to extract is in the "Downloads" folder you should be able to navigate there by running the following command in your CMD/Powershell first:

cd "$HOME\Downloads"
npx wpress-extract <downloaded-file.wpress>
Enter fullscreen mode Exit fullscreen mode

Other options to navigate to the Download folder in CMD/Powershell are shown here: stackoverflow.com/a/57950443/831465

Thread Thread
 
ofhouse profile image
Felix Haus

You could also open a CMD session right from the explorer by typing cmd right in the address bar of the explorer: howtogeek.com/235101/10-ways-to-op...

This will open a new terminal session from the directory that is opened in the explorer and you could start extracting:

npx wpress-extract <downloaded-file.wpress>
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
erionbrace profile image
erionbrace

After following all your instruction, now it says:
Error: Output dir is not empty. Clear it first or use the --force option to override it.

Thread Thread
 
ofhouse profile image
Felix Haus

This happens when a directory exists with the same name as the downloaded file.
e.g. when your file is named my-backup.wpress and there is a folder /my-backup in the same directory the extraction is stopped since it would override the content in the /my-backup folder on extraction.

You could simply rename the .wpress file (e.g. from my-backup.wpress to my-backup-1.wpress) to workaround this.

Thread Thread
 
erionbrace profile image
erionbrace

I can't thank you enough. This really helped me. Wish you all the best

Thread Thread
 
erionbrace profile image
erionbrace

Out of curiosity, is there any way to convert a regular file to a .wpress file?

Thread Thread
 
ofhouse profile image
Felix Haus

The reverse direction (creating a .wpress file from a directory) is a bit more complicated.
Inside the .wpress file are stored some metadata (e.g. installed plugins, Wordpress version etc.) that are not available in a local file context.
When providing this metadata manually, it would be possible to create a .wpress file.
But this is out of scope for me since I currently have no time to extend the tool further.