Title: Update wordpress remotely
Last modified: August 20, 2016

---

# Update wordpress remotely

 *  [metro](https://wordpress.org/support/users/kiddie/)
 * (@kiddie)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/update-wordpress-remotely/)
 * Hello,
    I wanna update wordpress sites from my cpanel.Actually remotely So, i
   am making a script :
 *     ```
       .........................
       //login successful
       //upgrading option start
       $urlto=('site.com/wp-admin/update-core.php');
       $ch = curl_init();
       curl_setopt($ch, CURLOPT_URL, $urlto);
       curl_setopt($ch, CURLOPT_POST, 1);
       curl_setopt($ch, CURLOPT_POSTFIELDS,"upgrade=Update Now");
       curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
       curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
       curl_setopt($ch, CURLOPT_HEADER, 0);
       curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
           curl_setopt($ch, CURLOPT_COOKIEJAR, "COOKIE.txt");
           curl_setopt($ch, CURLOPT_COOKIEFILE, "COOKIE.txt");
       $buffer = curl_exec($ch);
       ```
   
 * I can successfully login remotly from my cpanel by run this script. But it is
   not upgrading the wordpress.
    my wordpress upgrading page html is :
 * > <form method=”post” action=”update-core.php?action=do-core-upgrade” name=”upgrade”
   > class=”upgrade”><input type=”hidden” id=”_wpnonce” name=”_wpnonce” value=”5434b20e73″/
   > ><input type=”hidden” name=”_wp_http_referer” value=”/testser/wp-admin/update-
   > core.php” /><p><input name=”version” value=”3.4.2″ type=”hidden”/><input name
   > =”locale” value=”en_US” type=”hidden”/><input type=”submit” name=”upgrade” 
   > id=”upgrade” class=”button-primary” value=”Update Now” /></form>
 * What is the wrong in this code ?

The topic ‘Update wordpress remotely’ is closed to new replies.

## Tags

 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [metro](https://wordpress.org/support/users/kiddie/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/update-wordpress-remotely/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
