0

I'm working on Ubuntu 16.04, with MySQL 14:14, Nginx, PHP 7.0.33 and WordPress 5.0.9.

I want to set up a copy of a WordPress site on my development machine. I have exported an XML file from the production site using:

Tools > Export > (o) All content > [ Download Export File ]

The file is 341 MB.

If I use WordPress's built-in Tools > Import > WordPress [Install Now] button, I see a dialog which asks for FTP credentials (Hostname, FTP username, FTP password), but I'm working directly on the machine on which I wish to install the data.

What values can I provide for this?

Looking for an alternative solution, I have tried importing it into the WordPress database using PHPMyAdmin, after having increased the memory allocation, but this fails. I looked at ways of importing an entire database in XML format through the MySQL command line, but I have only found ways of using LOAD XML to import data to a specific table.

Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
James Newton
  • 6,623
  • 8
  • 49
  • 113
  • Is it a priority to use the XML file? For me, the best way I found to replicate a website to a server to another (eg: localhost) is to use the `WP CLI`. Let me know if you want the how-to or if you need the XML step. – gael May 10 '20 at 09:54
  • Thanks @gael. I've installed WP CLI. I can only export the data through the WordPress Export Tools, and that creates an XML document. So yes, XML is the only source that I have. The WP CLI import function deals with WXR files, so help with the XML step would be great. – James Newton May 10 '20 at 10:05
  • You don't have access to both servers via SSH? – gael May 10 '20 at 10:23
  • I don't have access to the production server via SSH. I have direct access to my development server, so I don't require to use SSH. – James Newton May 10 '20 at 10:26
  • Sorry I missed the begining of your question. For FTP credentials you may configure Directory permissions to be writable. https://stackoverflow.com/a/23755604/3623080 . – gael May 10 '20 at 15:52
  • I solved the problem in 2 ways: I installed [vsftpd](https://linuxconfig.org/how-to-setup-and-use-ftp-server-in-ubuntu-linux), so that I could use `localhost` and the same username and password that I use to log in to my computer for the FTP connection. This also made it easy to install themes and update them. I also used [WP CLI](https://developer.wordpress.org/cli/commands/) as you suggested. – James Newton May 11 '20 at 05:09

0 Answers0