0

I would like to pass on a website to a client, but he is not paying for the CMS backend.

Could I just remove the wp-admin Folder and just use the front-end of wordpress?

Could there go something wrong by doing this?

Is there a better way of disabling the backend CMS?

4 Answers 4

1

This sounds like is a really bad idea. Like selling a car without the car keys!

If you delete the wp-admin folder, the site will not might not work due to PHP errors.

Many sites depend on ajax through /wp-admin/admin-ajax.php.

You will also not be able to update such an install in a meaningful way.

Hand instead the theme or plugin to your client - don't modify or delete parts of the WordPress core.

3
  • 3
    Or selling the car and burning the money you get for it, hahahaha Commented Jan 5, 2016 at 10:24
  • A bit of a tricky situation with the client :) But I definitely understand your point. Actually the site works all fine without the wp-admin-folder so far.
    – pixelcrash
    Commented Jan 5, 2016 at 10:53
  • It was a plugin on my dev install that was depended on the wp-admin folder that gave me the PHP errors when I tested this first, so I updated the answer ;-) Sounds like a non-optimal situation for you, hopefully you can find a way out of it soon ;-) @pixelcrash
    – birgire
    Commented Jan 5, 2016 at 11:17
1

That definitely sounds like a bad idea. I would recommend just not giving them access to the back end. If they have no username then they basically don't have wp-admin, but you haven't risked breaking anything.

1
  • 1
    Also this way if they later decide that they do want to pay for the CMS then you can just make them a user and get paid.
    – mrben522
    Commented Jun 16, 2017 at 19:34
0

iThemes Security allows for renaming of the admin / login routes. This is an easy way to hide (and protect) your website.

iThemes Security: https://wordpress.org/plugins/better-wp-security/

To block non-admin users from getting into wp-admin, you just need to add the following code to your functions.php:

 add_action( 'init', 'blockusers_init' );

 function blockusers_init() {
    if ( is_admin() && ! current_user_can( 'administrator' ) && 
! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
        wp_redirect( home_url() );
        exit;
    }
}

Now, only administrator users can access wp-admin, everyone else will be re-directed to the homepage.

0

Make a HTML version of your site and give them that. Then your site will not be wordpress and they will not have a CMS. There will be ways around the other solutions

1) Site without the wp-admin folder - they can get their own wp-admin from repository and brute force the admin login.

2) @mrben522 Dont give them codes to admin - they can brute force the login.

3)@birgire give them the theme - this is the CMS section. They download wordpress and have their CMS for free.

4)@Liam Stewart - ithemes actually stops people getting in so this should be a good solution. But if they get access to the DB, and they would have access to FTP - they can just turn it off.

So the only way to give them a site that is not CMS would be HTML only, which you can make from your wordpress site in many ways. PLugins, crawlers etc. search google

2
  • Thanks for all the answers. How I currently solve this situation is with the wp2static plugin from wp2static.com. This makes the site more secure, way faster and the client gets only what he is paying for.
    – pixelcrash
    Commented Jan 16, 2020 at 11:10
  • I doubt using plugins ever makes the site more secure. Have you looked at the code in the plugin? From a very brief look at the link you referenced this plugin needs wordpress and then serves a static site mainly for speed help. This would not solve the original question, because unless you harvest the static pages you will still need the backend CMS or the site will fail.
    – Jon
    Commented Jan 17, 2020 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.