Home Website TutorialsWordPress Preventing plugin installation on WordPress

Preventing plugin installation on WordPress

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

In this article, AZDIGI will help you prevent plugin installation on WordPress.

I. Why do we need to block plugin installation on WordPress?

Why do we need to block plugin installation on WordPress? Common in it as some of the following reasons:

  • We are website designers and after designing the website, we need to hand it over to the customer for administration. Of course, we will block the permission to install the plugin to avoid the website having an incompatibility error.
  • We fear the website will be hijacked and install backup plugins to get the source code.
  • Afraid that the website is infected with malicious code and the malicious code automatically install the File Manager plugin, then we can completely delete the source code of our website.
  • Don’t want the website to upgrade the theme/plugin automatically.

II. Preventing plugin installation on WordPress

Go to the wp-config.php file in the WordPress website source code and insert the following configuration line:

AZDIGI Tutorial
define( 'DISALLOW_FILE_MODS', true );
    
Screen Shot 2022 05 31 at 13.01.11

After saving the file, you can check that your plugin settings page does not have a button to install a new plugin.

image 13

In case you want to update or install a new plugin, we just need to add // in front of the configuration line and then save it.

Screen Shot 2022 05 31 at 13.01.23
Screen Shot 2022 05 31 at 13.01.41

III. Summary

Hopefully, this article will help you manage your website better or simply know more tips when using WordPress.

Wishing you success!

See more useful website tutorial articles at the following link:

If you need support, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign