Title: Php file?
Last modified: August 21, 2016

---

# Php file?

 *  [alex_smith22](https://wordpress.org/support/users/alex_smith22/)
 * (@alex_smith22)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/)
 * 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)

 *  [WPYoda](https://wordpress.org/support/users/wpyoda/)
 * (@wpyoda)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/#post-3841546)
 * 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](https://wordpress.org/support/users/alex_smith22/)
 * (@alex_smith22)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/#post-3841550)
 * Where would I put that or upload that though?
 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/#post-3841619)
 * 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](https://wordpress.org/support/users/alex_smith22/)
 * (@alex_smith22)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/#post-3841759)
 * Yes! That’s exactly what I mean, thanks for clarifying it.
 * Is it doable without having access to the host info?
 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/#post-3841771)
 * > 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](https://wordpress.org/support/users/alex_smith22/)
 * (@alex_smith22)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/#post-3841781)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [alex_smith22](https://wordpress.org/support/users/alex_smith22/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/php-file-2/#post-3841781)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
