• Ok, so I’ve taken over a WordPress website for someone.

    I want to use one of their previous php files, but it is with the old theme and I have since updated it with a new one.

    The are still in control of hosting, so I don’t have access to it.

    Is there a way to upload or transfer that php file from their old theme into my theme without having to do anything on the host?

Viewing 6 replies - 1 through 6 (of 6 total)
  • If you can write and run some PHP code then…

    <?php
    
    $copyFrom = '/public_html/.../oldTheme/file.php';
    $copyTo = '/public_html/.../newTheme/file.php';
    
    if(!copy($copyFrom, $copyTo)){
        echo 'copy failed';
    }
    
    ?>
    Thread Starter alex_smith22

    (@alex_smith22)

    Where would I put that or upload that though?

    I think what you mean is you updated the theme and now a custom php file is gone. Is that correct?

    Thread Starter alex_smith22

    (@alex_smith22)

    Yes! That’s exactly what I mean, thanks for clarifying it.

    Is it doable without having access to the host info?

    Is it doable without having access to the host info?

    Actually, even with host info it may not be if you do not have a backup, or the host cannot provide one…

    Thread Starter alex_smith22

    (@alex_smith22)

    Well, I did back up the previous site they had before I installed a theme. I can still go into the editor, and change the drop-down menu to the one that has the page.

    I wasn’t sure if I could just copy/past and upload it without having to upload it through the host.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Php file?’ is closed to new replies.