1

I want to copy a plugin folder to another folder, outside the WordPress installation, but in the same host, accessible via the same FTP account.

Is there a way? I read something about copying directories, but I don't understand it. How i made it and is it a .php file?

Maybe the following code will work?

global $wp_filesystem;
$wp_filesystem->copy_dir( 
    '/path/you/are/copying/from/', 
    '/path/you/are/copying/to/'
);
  • 1
    What have you tried so far? Have you tried the code snippet you posted? If yes: How and where? In a plugin? And what do you mean by "How i made it and is it a .php file?" ? – kaiser Jan 27 '17 at 17:03
  • Funnily enough @kaiser had a what the hack universe moment here :) You might want to read »How do I ask a good question?« and take a look at the help center for more information. – Nicolai Jan 27 '17 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.