How to Remove Enterprise Links and Ads in aaPanel 8.0.2
I use the BaoTa/aaPanel backend much like many other people do, but only for a small set of tasks. Most of the time, it only comes out when I need to prepare automatic scripts during a migration, confirm the firewall’s default ports, and run the one-click migration tool once.
Because of that, I usually leave it alone and rarely bother upgrading.
This time was different. The one-click migration tool would not continue unless both servers were upgraded to the latest version. After updating, the new interface immediately felt cluttered. In version 8.0.2, there are far too many business-oriented and enterprise upsell entries in the panel, and several of the pop-ups are the annoying two-step kind: close one layer, wait a moment, then close another.
I have very little tolerance for that sort of thing, so I spent part of a day trimming the interface down until it was quieter. I wrote the changes down afterward as a personal record, and they may also help anyone trying to clean up the same version.
The section names below follow the left-hand navigation labels in the panel. I did not touch App Store, and I also skipped things like FTP and WAF because I do not use them and they can already be hidden from within the panel.
You may notice that I am not providing modified files directly. There is a reason for that. Before writing this up, I checked the panel’s user agreement. Two points matter here: source code can be modified for personal use, but modified versions must not be publicly distributed.
2.2 以自用为目的,在保留版权标识的前提下可任意修改程序源码,但不得公开发行。
4.3 用户在发布或者集成堡塔的时候,不得对堡塔源码做任何改动。
The edits below were made against version 8.0.2. I noted them down in a hurry, so if a line number seems off, compare it carefully with the original code instead of trusting the number blindly.
There are really only two kinds of changes here:
- fixed interface items are usually in
/www/server/panel/BTPanel/templates/default/HTML files - dynamic items are usually in
/www/server/panel/BTPanel/static/js/JavaScript files
Even if later versions change, the general structure will probably stay similar.
If you make a mistake and the panel goes white-screen, you can repair it from the shell with:
bt 16
That should bring it back.
Version label in the panel header
vim /www/server/panel/BTPanel/templates/default/layout.html
930行:
var _html = '''+(!is_pay?'免费版 ':'')+' {{session ["version"] }}' + proHTML +'
改为
var _html = ''修改版 {{session ["version"] }}
※重启面板生效
vim /www/server/panel/BTPanel/templates/default/index.html
149行:
{{data
['pd']
|safe}} {{session
['version']
}}
改为
修改版 {{session
['version']
}}
※重启面板生效
Home page
Pop-up content on the dashboard
vim /www/server/panel/BTPanel/static/js/index.js
3758行:
if((day_not_display && parseInt(day_not_display)注掉或删除
Home — Disk — Disk Cleanup
vim /www/server/panel/BTPanel/static/js/index.js
950行:\改为
Home — Software — Recommended Software
vim /www/server/panel/BTPanel/static/js/index.js
2362行:for (var i = 0; i改为
for (var i = 0; i




Websites
Remove “Vulnerability Scan” from the function buttons
vim /www/server/panel/BTPanel/static/js/site.js
2449行:{ title: '漏洞扫描', event: function (ev) { site.reader_scan_view() } },注掉
Small shield icon before the site name
Move it onto the gear button, and remove the check mark in front of WAF.
Remove “Statistics” and “WAF” from website actions
vim /www/server/panel/BTPanel/static/js/site.js
2217行:for (var i = 0; i改为
for (var i = 0; i
Website — Settings — Access Restriction — Mutual Authentication
vim /www/server/panel/BTPanel/static/js/site.js
6537行:加密访问禁止访问【推荐】\改为
加密访问禁止访问\
Website — Settings — SSL — Commercial SSL Certificates
vim /www/server/panel/BTPanel/static/js/site.js
11810行:
d1833d
※注意,这里是删除!
Website — Settings — PHP — Site Protection
vim /www/server/panel/BTPanel/static/js/site.js
7545行:if (sdata.phpversion != 'other') {改为
if (sdata.phpversion != 'other') {return;
Website — Settings — Anti-Tamper / Security Scan
vim /www/server/panel/BTPanel/static/js/site.js
11174行:{ title: '防篡改', callback: site.edit.set_tamper_proof }, { title: '安全扫描', callback: site.edit.security_scanning },注掉

Databases
Database — Enterprise Incremental Backup
vim /www/server/panel/BTPanel/static/js/database.js
270行:event:function(){改为
event:function(){return;
Database — Backup button — Incremental Backup
vim /www/server/panel/BTPanel/static/js/database.js
824行:
d635d
※注意,这里是删除!
Security
System Firewall — IP Rules — Geolocation — “Click to View”
vim /www/server/panel/BTPanel/static/js/firewall.js
694行:title: '',
改为
title: '归属地',
696行:
if(parseInt(bt.get_cookie('ltd_end')) 点击查看'改为
if(parseInt(bt.get_cookie('ltd_end')) local'
System Firewall — SSH Login Logs
This appears both in the top menu and in the middle tab area, so two files need to be changed.
vim /www/server/panel/BTPanel/static/js/firewall.js
2031行:$('#sshDetailed').html('成功:'+ error.success +'/失败:'+ error.error +'');
改为
$('#sshDetailed').html('成功:'+ error.success +'/失败:'+ error.error +'');
vim /www/server/panel/BTPanel/templates/default/firewall.html
1792行:
改为
※重启面板生效
Security Check / Sensitive Word Check / PHP Website Security / Intrusion Prevention / System Hardening
vim /www/server/panel/BTPanel/templates/default/firewall.html
1687行:安全检测违规词检测PHP网站安全入侵防御系统加固改为
※重启面板生效
Files
Download List
vim /www/server/panel/BTPanel/static/js/files.js
123行:$.each(that.cloud_storage_download_list, function (index, item) {改为
$.each(that.cloud_storage_download_list, function (index, item) {return;
Files — Enterprise Anti-Tamper / File Sync
vim /www/server/panel/BTPanel/templates/default/files.html
381行:
The general idea behind all of these edits is simple: fixed labels and blocks are usually easiest to remove from the HTML templates, while conditional UI items, pop-ups, and dynamically rendered entries are usually controlled from the JavaScript files.
If you are making similar changes on a later release, start by checking whether the item is rendered directly in a template or injected by script. The filenames listed here should still point you in the right direction even if exact line numbers drift over time.
One final reminder: some changes only take effect after restarting the panel, and if anything breaks badly enough to produce a blank page, use:
bt 16
before trying again.