ShellHacks
42 subscribers
167 links
www.ShellHacks.com | Command-Line Tips & Tricks
Download Telegram
Channel created
🌐 Python: Module Path – List Modules & Get Locations

Let’s say you have a Python module somehow installed on a computer, so you can "import" it, and you want to find a path to this module to check its source files.

In this note i am showing how to list all the locally installed Python modules and how to find the paths to these Python modules.

πŸ“– Continue Reading
🌐 WordPress: Auto-Post to Telegram Channel (No Plugin)

You can easily increase visitor traffic to your WordPress website by integrating it with a Telegram channel.

However, manually sharing every blog post to the Telegram channel can become a time-consuming task - especially if you publish an article every day.

In this note i will show how to create a callback function that will automatically publish new posts from your WordPress website to the Telegram channel without any plugins.

πŸ“– Continue Reading
🌐 WordPress: Enable REST API (rest_disabled: 401/403)

The WordPress REST API has become a part of the WordPress core starting from the version 4.7.

It is, for example, required by the WordPress Block Editor, and if the WordPress REST API is disabled, you won't be able to publish or update your posts: "Updating failed. REST API disabled.".

Normally, the WordPress REST API should be enabled by default and doesn't require installation of any additional plugins for this.

If the WordPress REST API on your website is still disabled this may be caused by the "W3 Total Cache" plugin (if it is installed and active).

This note shows how to enable the WordPress REST API if it has been disabled by the "W3 Total Cache".

πŸ“– Continue Reading
🌐 WordPress: Disable REST API – Restrict Access

According to the official WordPress recommendations you should not disable the WordPress REST API as this will break the "WordPress Admin" functionality.

For example, the WordPress Block Editor requires the WordPress REST API and if you disable it you won't be able to publish or update your posts anymore.

However, you can use a filter to require that API consumers be authenticated, which effectively prevents anonymous external access.

πŸ“– Continue Reading