I would like to create a test site for a huge wordpress live site (a news site). It has tons of images in /wp-content/uploads and /wp-content/gallery, and other folders of /wp-content are also packed with stuff, so duplicating all that takes a very very long time.
How can I setup a test site by copying the live site without the /wp-content folder but just linking to it somehow? Nothing needs to be changed or uploaded in /wp-content, just to see and read.
Thanks!
I would like to create a test site for a huge wordpress live site (a news site). It has tons of images in /wp-content/uploads and /wp-content/gallery, and other folders of /wp-content are also packed with stuff, so duplicating all that takes a very very long time.
How can I setup a test site by copying the live site without the /wp-content folder but just linking to it somehow? Nothing needs to be changed or uploaded in /wp-content, just to see and read.
Thanks!
Share Improve this question asked Feb 15, 2019 at 9:05 Mister WoyngMister Woyng 1114 bronze badges1 Answer
Reset to default 0Create a hard or symbolic link. However, you would of course need to take care that testing doesn't affect the contents of wp-content
.
Another approach would be to put wp-content
(or a copy) into its own file system partition (or just make a .img
file from it). Then dd
(or its Windows analog) should duplicate it fairly quickly.
As an aside, its worth asking if you really need a complete copy of the large set of files in wp-content
. Unless you're doing performance testing, perhaps a well-chosen subset would suffice.
added:
One thing to check is whether anything important behaves differently with a symbolic link. The one case that comes to mind is recursive deletion of the test directory tree. IIRC it will detect the existence of the symlink and delete it but not recurse into it, avoiding unintentional deletion of part of the production set-up. So here the difference is actually a good thing. (But I'd double-check the correctness of this.) (This might also be a reason to do a soft (symbolic) link instead of a hard link.)