Welcome to WordPress. From a new plugin you can print hello world like this.
First of all, call an action within a Global Request method as follows:
# ../wp-content/plugins/MyPlugin/myplugin.php if (isset($_REQUEST['test']) && $_REQUEST['test'] == 'a') { add_action('init', function () { echo 'Hello World'; echo '<br>'; echo 'Hello from WordPress'; echo '<br>'; die(); }); }
Now run the code.
Go to your site url like
http://wordpress.local/?test=a
Enjoy the output!
Test Reply
hello
another reply