Questions tagged [activation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Backend working but not front

I tried to move a site I was working on from my laptop to my desktop computer. Once I got some issues with the database sorted I managed to log into the admin. After updating everything that needed it ...
TLawson's user avatar
0 votes
0 answers
40 views

My activator class isn't running the code inside

I am using the WP Plugin Boilerplate and I am requiring files and admin notices within the activator class but my Kirki panel is not showing up in the customizer and the admin notice isn't appearing. ...
JayDev95's user avatar
  • 157
0 votes
1 answer
32 views

Is there a canonical way for a plugin to install a mu-plugin or drop-in?

I have a couple of plugins that need to install drop-in modules or mu-plugin modules when they're activated, and remove them when they're deactivated. This requires copying -- or maybe symlinking -- a ...
O. Jones's user avatar
  • 471
0 votes
1 answer
126 views

how can a plugin return an error message on activation?

I'm developing a plugin that needs a certain php extension (sqlite3) to be available, or it can't work correctly. Is there a way I can present an error message to the site owner when they try to ...
O. Jones's user avatar
  • 471
1 vote
2 answers
891 views

wordpress in nginx docker container connected to php:8-fpm container and mariadb container isn't creating any tables on plugin activation

I searched the whole net and stackexchange for a reason and a solution, but couldn't find any. There are many questions (and answers) related to own plugins and the code how to create tables on ...
Christin Löhner's user avatar
0 votes
1 answer
102 views

Wrong activation/confirmation link in email

I've created a custom login page login.php inside the root. (e.g.: http://www.example.com/login.php) /* LOGIN PAGE. */ // Login URL. function custom_login_url($login_url, $redirect, $force_reauth ...
Andrea Alba's user avatar
0 votes
0 answers
16 views

TinyMCE is inactive after installation

Installed TinyMCE, but still getting this toolbar : https://ps.w.org/tinymce-advanced/assets/screenshot-1.jpg?rev=2390186 instead of this : https://ps.w.org/tinymce-advanced/assets/screenshot-4.jpg?...
sten's user avatar
  • 101
0 votes
1 answer
141 views

register_activation_hook() not working as expected

This is the main plugin file. It activates but nothing happens. The menu is not created. /* * Activate plugin * create admin menu * create more stuff */ register_activation_hook(__FILE__, '...
Kustom's user avatar
  • 1
1 vote
0 answers
49 views

How to check if tables in Wordpress still exists after activations

I have problems that my checkIfTablesExists() function is never called, even though I add some fake table name to the list of table names. The reason I want to make this function is to check if the ...
egillanton's user avatar
0 votes
1 answer
45 views

Multiple array for post_content on plugin activation

sorry for my bad English. I want to create multiple pages when activating a plugin. This also works, but how do I get different content in the different pages? if (!current_user_can('activate_plugins')...
EndlessOne's user avatar
1 vote
0 answers
30 views

How to block plugin activations with no known user or coming from unknown IP address range?

I have received a Sucuri alert for an unauthorized plugin activation: Event: Plugin Activated Website: http://www.XXXXXX.XXX IP Address: XXX.XXX.XXX.XXX Reverse IP: XXXXXX.XXXXXX.XXXX Date/Time: 7 ...
AlexBa's user avatar
  • 11
0 votes
1 answer
480 views

Class cannot be found, but it's available in the file, I get: Fatal Error: Uncaught Error: Class 'Blocks\Base\Activation' not found

Class cannot be found, but the declaration is correct. Here is my code: Info-Wheel.php if ( file_exists( dirname( __FILE__ ) . "/vendor/autoload.php" ) ) { require_once dirname( __FILE__ )...
Mähnenwolf's user avatar
0 votes
1 answer
134 views

How to run flush_rewrite_rules on activation after i register my custom post type using Wordpress Boilerplate Plugin

I have created a plugin that register a new CPT but it doesnt work because i have to flush_rewrite_rules() (i can do this by going into the permalink setting page and save, but its not the right way) ...
NeaMitika's user avatar
0 votes
1 answer
402 views

How to let new users login without email activation

The idea is to get rid of mandatory new account activation through email As is: register new user -> exit without following to email verification link -> try to log in -> Site says something ...
0LEg's user avatar
  • 1
0 votes
2 answers
92 views

Activation email to change admin address not being sent to Gsuite email account

I changed my admin email in the WordPress dashboard I'm using to create a website and it's just not sending out the email to confirm changes. The domain is hosted through BlueHost and the domain email ...
Empathy's user avatar
1 vote
0 answers
44 views

On multisite, plugins are disabled prematurely when viewing the /wp-activate.php page file

On multisite, setting the WP_INSTALLING constant on wp-activate.php file disables all plugins prematurely. Why didn't the core create a way to bypass this. Though this may be required for activating ...
John Zenith's user avatar
0 votes
0 answers
15 views

How to check for already existing plugin versions on activation? and prevent errors

If a user has a version of my plugin installed and activated, let's say version 1.1 And I send the user version 1.2 and he tries to upload and activate the new version, what will happen is that they ...
Stefan S's user avatar
1 vote
1 answer
40 views

Prevent a plugin from being automatically activated

On a site I look after, the hosting company automatically force a plugin on us that, well it's useless. I'm looking for a hook/action that can be used to fully prevent that plugin from being ...
rich's user avatar
  • 149
0 votes
0 answers
465 views

how to enable/activate a plugin per Cpanel

The webdesign company deleted my access to plugins in my wordpress panel so, I downloaded the plugin.zip and extracted it in wp-content/plugins In phpmyadmin/wp-options/active-plugin there was not ...
parisa parvizi's user avatar
1 vote
1 answer
70 views

Run plugins only on certain pages

I want to use my personal plugin only in some pages. If I remove the add_action function ('the_content', 'my_plugin_content'); the plugin does not show me the content of the other pages that are not ...
Luca's user avatar
  • 19
0 votes
0 answers
378 views

My Wordpress activation hook isn't working

I just can't see why my activation hook isn't working. /* ****Debug function ****/ function console_log( $data ){ echo '<script>'; echo 'console.log('. json_encode( $data ) .')'; echo '&...
SgtSunshine's user avatar
0 votes
1 answer
191 views

Wordpress Plugin Activate / Deactive Failing

Below is my plugin.php file that would install into wp-content <?php // If this file is called directly, abort. namespace Booker; if ( ! defined( 'WPINC' ) ) { die; } /** ...
Narrim's user avatar
  • 133
0 votes
1 answer
391 views

WordPress Fatal error: Uncaught Error: Call to undefined function dbDelta()

On plugin activation hook I want to create a table but the following code is giving Uncaught Error. I just wonder why it is not giving this error since I am properly including update.php. global $...
pixelngrain's user avatar
  • 1,370
0 votes
2 answers
254 views

Create a CSS file in plugin folder when theme is activated

So this is not a transferrable question to other sites out there, but I am creating a Wordpress multisite for internal use at our office and instead of duplicating the theme CSS, JS, and other assets ...
markb's user avatar
  • 299
1 vote
1 answer
24 views

When a plugin gets updated from the repo, does the "activation" hook fire again?

When you activate a plugin, it goes through the whole activate .. bounce to the next page thing. Does the plugin fire that hook when it is updated, or only during the initial installation?
John Dee's user avatar
  • 493
0 votes
3 answers
2k views

How to create multiple database tables on plugin activation?

I have an activation hook to create 2 new database tables that don't exist, only the second table is created from this code: public function add_tables() { // Global $wpdb ...
bigdaveygeorge's user avatar
0 votes
1 answer
102 views

explanation for activate_plugin function in wordpress core

This function is in plugin.php file in wordpress core. I read the code and didn't get quietly what does it do. Can anyone give some explanation for this function?
Mahdi's user avatar
  • 29
0 votes
1 answer
337 views

Activate User account for Sub Site broken

When I add a new user to a WP Multisite sub-site, an email is sent out asking the user to click a link to activate. The link looks like this: https://website.com/subsite/wp-activate.php?key=XXXXXXXXX ...
Dawn's user avatar
  • 23
0 votes
0 answers
74 views

Custom Plugin activation error in Multisite

I have created one custom plugin but when i try to Network Active in multisite its generate error like below But when i install plugin from individual admin its successfully activated. Any help is ...
Pratik Patel's user avatar
  • 1,047
0 votes
1 answer
442 views

Redirect after plugin activation

I am not a techy guy so please explain in simplest ways how can i solve this problem . When i install a plugin ( it does not matter which plugin) and then press to activate it , it redirects me to ...
George Adrian's user avatar
0 votes
1 answer
632 views

Cannot modify header information - headers already sent during plugin activation

I am getting this error PHP Warning: Cannot modify header information - headers already sent by (output started at /home/zk2ba8xn663w/public_html/wp-includes/formatting.php:5100) in /home/...
user avatar
0 votes
1 answer
222 views

Redirect to custom admin menu after plugin activation

I believe i have to add this to my plugin to redirect after plugin activation as per https://wordpress.stackexchange.com/a/178504/145078 register_activation_hook(__FILE__, 'nht_plugin_activate'); ...
user avatar
0 votes
1 answer
192 views

Is it possible to send user new password after they clicking on forgot password in word press

In word press is it possible to send users to new password after they are clicking on forgot password page ? Actually I dont want to send any url to users email which can take them to any page. Also ...
Hari Health Care's user avatar
1 vote
1 answer
875 views

How to properly setup an activation hook

I am trying to register an activation hook for my plugin. The plugin is using classes and the actual activation method is held in a separate admin class. Reading the documentation for ...
Cyclonecode's user avatar
  • 1,104
2 votes
1 answer
532 views

Wordpress register_activation_hook table creation not working

I've created a simple Class for my wordpress plugin. The main file looks like this: <?php /* * Plugin Name: Codes * Description: Generates a coupon code after checkout * Version: 0.1.0 * ...
Markus's user avatar
  • 123
2 votes
1 answer
387 views

Plugin activation error due to unexpected output

I am getting the following error when I activate my plugin: The plugin generated 22 characters of unexpected output during activation. If you notice “headers already sent” messages, problems ...
Vijay Chavda's user avatar
1 vote
1 answer
3k views

Plugin won't activate - cannot declare class (already in use)

I have no idea what I'm doing. I'm using the WordPress Plugin Boilerplate When activating my blank plugin, I receive the following error. Fatal error: Cannot declare class Requests, because the name ...
CodyLeeK's user avatar
1 vote
0 answers
30 views

Use an activation code to change a role [closed]

Wonder if you can help me. I'm making a website based on accounts and a subscription for content control. At the minute, the way activation of a paid account works, is the user buys a subscription via ...
Miles's user avatar
  • 11
1 vote
1 answer
798 views

Settings not set after calling register_setting()

I have a plugin with an activation hooked function. This function has to register 4 setting variables. I can't see why, but only the first setting is registered correctly, the last 3 are somehow ...
GigiSan's user avatar
  • 235
3 votes
2 answers
68 views

Function to activate WordPress theme inside a plugin

I am creating a plugin that generates a theme, and so I want to have a checkbox at the end of the theme generation process that gives the possibility to activate the freshly created theme without ...
Notorious Etam's user avatar
1 vote
1 answer
1k views

Detect when any plugin is activated or deactivated

I have a starter theme I use for most websites I built myself. Because each site has different plugin dependencies, I'm trying to create a script that essentially collates a list of all plugins ...
Tex0gen's user avatar
  • 572
1 vote
1 answer
56 views

Is any information available in PHP files in WP about plugin activation history?

I want to identify the plugin names earlier activated on my WordPress site.
user146550's user avatar
1 vote
0 answers
32 views

Are functions in main plugin file called before function bound to register_activation_hook runs?

In my plugin, I am doing a minimum-supported PHP version compatibility check via a function bound to register_activation_hook and halting activation for those on PHP version less than the minimum ...
learning_13's user avatar
0 votes
1 answer
77 views

Sub Plugin deactivation when Parent Plugin deactivate

I have created sub plugin of woocoomerce.How I can deactivate the subplugin when woocoomerce is deactivate.
pooja's user avatar
  • 11
-2 votes
2 answers
42 views

Install theme as part of a plugin

I know that you can install plugin code as part of a theme, but I would like to do it the other way round. I'm developing a plugin that changes many aspects of WordPress and most will not be visible ...
Sean's user avatar
  • 647
2 votes
1 answer
2k views

Correct way to use register_activation_hook

Hi I am developing a plugin and got stuck at one point. I have tried exploring different forums as well as WordPress codex but its not 100% clear. Can anyone help me understand how ...
bakar's user avatar
  • 101
0 votes
1 answer
2k views

Advanced WordPress plugin activation detection

I'm testing the plugin activation detection because something went wrong in my plugin. I discovered the problem, but didn't understand it: I'm trying to check for plugins activation (others and my ...
Maxwell s.c's user avatar
0 votes
2 answers
996 views

How can I manually activate a new site in a wordpress multisite network?

A client signed up for a new site in my multisite network. But, didn't finished the activation because they never received the email to verify and register. As the network administrator, I don't see ...
user658182's user avatar
0 votes
1 answer
36 views

Custom Table doesn't create on plugin activation

I'm a newbie in plugin development. I tried following this documentation: https://codex.wordpress.org/Function_Reference/register_activation_hook I've created a function on the main plugin file (wp-...
Felipe Gomes's user avatar
7 votes
2 answers
2k views

Must activation/deactivation functions in a class be static?

The description for register_uninstall_hook's $callback parameter states: Must be a static method or function.1 There is no such comment for register_activation_hook or register_deactivation_hook. ...
Spencer's user avatar
  • 246