Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Feature Request: Trigger Full Reindex from Magento Admin Backend #400

Open
simonmaass opened this issue Nov 29, 2021 · 4 comments
Open

Feature Request: Trigger Full Reindex from Magento Admin Backend #400

simonmaass opened this issue Nov 29, 2021 · 4 comments

Comments

@simonmaass
Copy link

It would be great if there was a button in the config to trigger a full reindex:

image

@clinton-origin
Copy link

@simonmaass I just created my own module to do it. It's just a simple magento ajax button that executes the below. Also in the same module we have a button that clear the Redis cache as well. Let me know if you want the module.

public function execute()
{
try {
$command = 'php bin/magento vsbridge:reindex --all';
exec($command);
} catch (\Exception $e) {
$result = $this->resultJsonFactory->create();
return $result->setData(['success' => true, 'message' => $e]);
}

    $message = 'done';
    /** @var \Magento\Framework\Controller\Result\Json $result */
    $result = $this->resultJsonFactory->create();

    return $result->setData(['success' => true, 'message' => $message]);
}

@simonmaass
Copy link
Author

@clinton-origin oh that would be awesome if you could share it :)

@clinton-origin
Copy link

@simonmaass Here you go

https://github.com/clinton-origin/Magento-2-Cache-Cleaner

Just replace "Origin" with whatever you like in the system.xml file. This will show a tab in the Store > Config section

@simonmaass
Copy link
Author

thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants