Disable a page on WP site through FTP

7 replies
  • WEB DESIGN
  • |
I have an urgent request from a client to disable a page on his WP site (but he wants to re-activate it in the future).

He doesn't have WP credentials, but has given me FTP. Is this doable through FTP?
#disable #ftp #page #site
  • Profile picture of the author alexts
    Originally Posted by sodomojo View Post

    I have an urgent request from a client to disable a page on his WP site (but he wants to re-activate it in the future).

    He doesn't have WP credentials, but has given me FTP. Is this doable through FTP?

    FTP into account, find index.php page and insert the following on the top of the file:

    <?php

    exit();

    ?>
    Signature
    DomainRail is WordPress Plugin for displaying millions of expired domains on your site and earning revenue from affiliate registrations.
    {{ DiscussionBoard.errors[7909306].message }}
    • Profile picture of the author sodomojo
      Originally Posted by alexts View Post

      FTP into account, find index.php page and insert the following on the top of the file:

      <?php

      exit();

      ?>
      That'll do it huh? I don't need to specify what page I am disabling?
      {{ DiscussionBoard.errors[7909370].message }}
    • Profile picture of the author mojojuju
      Originally Posted by alexts View Post

      FTP into account, find index.php page and insert the following on the top of the file:

      <?php

      exit();

      ?>
      That will disable the page - along with the rest of the site.
      Signature

      :)

      {{ DiscussionBoard.errors[7909540].message }}
  • Profile picture of the author WebmasterMaine
    You can do it two ways...

    1 is via HTACCESS which is easier just put a line in to redirect that page to the home page.

    Or with PHP you can do it with something similar to this:


    <?
    global $post;
    $postidvar = $post->ID;

    if($postidvar == "postidtodisable") {
    put your redirect code here to a page you'd like it to go too
    }else{
    continute with the rest of the site

    wp code

    } //end
    Signature

    Are you looking for a Reliable Graphic Designer, Web Designer or Internet Marketing professional to help you with your website projects? We have a 72 hour turn around time on most website projects.

    Contact us today - Phone: 207-370-6700 Skype: WebmasterMaine Email: webmaster [at] webmastermaine dot com

    {{ DiscussionBoard.errors[7909918].message }}
  • Profile picture of the author WebmasterMaine
    n the .htaccess this is the code
    PHP Code:
    Redirect 301 /pagetodisable http://www.example.com/newpage 
    Signature

    Are you looking for a Reliable Graphic Designer, Web Designer or Internet Marketing professional to help you with your website projects? We have a 72 hour turn around time on most website projects.

    Contact us today - Phone: 207-370-6700 Skype: WebmasterMaine Email: webmaster [at] webmastermaine dot com

    {{ DiscussionBoard.errors[7909927].message }}
  • Profile picture of the author Istvan Horvath
    With both PHP "solutions" (alexts & WebmasterMaine) the problem is: none of you are able to tell the OP where to place the suggested PHP code... since Pages in WordPress are NOT files, just entries in the database.

    On the other hand: if the "client" doesn't have access to his own WP install (and cPanel) then it might not even be his site... :p

    [from cPanel you can get into phpMyadmin and change the WP login + if the host has cPanel, the FTP and cPanel login, usually is the same; MySQL login/pw is in the wp-config file > download via FTP -- just don't overcomplicate it...

    I am always sad to see the "expert" doesn't know more than the client - what are they paid for?]

    The .htaccess might also work, of course.
    Signature

    {{ DiscussionBoard.errors[7910373].message }}
    • Profile picture of the author WebmasterMaine
      Originally Posted by Istvan Horvath View Post

      With both PHP "solutions" (alexts & WebmasterMaine) the problem is: none of you are able to tell the OP where to place the suggested PHP code... since Pages in WordPress are NOT files, just entries in the database.

      On the other hand: if the "client" doesn't have access to his own WP install (and cPanel) then it might not even be his site... :p

      [from cPanel you can get into phpMyadmin and change the WP login + if the host has cPanel, the FTP and cPanel login, usually is the same; MySQL login/pw is in the wp-config file > download via FTP -- just don't overcomplicate it...

      I am always sad to see the "expert" doesn't know more than the client - what are they paid for?]

      The .htaccess might also work, of course.
      Good tip, but if he can't get access to those there are ways around it.

      The PHP Code would go in the Header.php file, but if he cannot get access to cPanel or Wordpress login .htaccess is the easiest way.

      Another way is if you look in the config.php file you will see the mySQL database and password.

      Create a PHP file to update that post as a draft using the mysql update code.
      Signature

      Are you looking for a Reliable Graphic Designer, Web Designer or Internet Marketing professional to help you with your website projects? We have a 72 hour turn around time on most website projects.

      Contact us today - Phone: 207-370-6700 Skype: WebmasterMaine Email: webmaster [at] webmastermaine dot com

      {{ DiscussionBoard.errors[7910411].message }}

Trending Topics