It’s really easy to develop wordpress plugin. Just follow some steps.
Step1: First make a PHP file in wp-content/plugin/ directory. Basically filename will be the name of your plugin. So try to give a unique name of your plugin.
Step2: Now write down some plugin information like Plugin name, Author, description etc. It’s compulsory because wordpress will detect your plugin through this information.
step3: Now write down your main task in a function like ShowText() [according to the above image].
Step4: To execute your function add an wordpress action like add_action (‘the_content’, ‘ShowText’) means when the wordpress will load the_content() function then your ShowText() function will also load.
Step5: To create a menu within wordpress admin control panel for your plugin, you need to call action like add_action(‘admin_menu’,’my_plugin_menu’);.. here my plugin menu is your plugin’s menu function.
Now you have to give some argument into the my_plugin_menu() such as ‘Title, Plugin slug, menu’s link output function. In this above image the output function is ‘my_plugin_options().
Now we have to write down the output within my_plugin_options()function.
Now I hope you have a little bit concept about the plugin development. Let’s start your wordpress plugin development journey.
Common Cause: The database name, username, password, or host was entered incorrectly.
Solution: Revisit your MySQL database to obtain the database name, username and password and reenter that information.
Error#2:?Headers Already Sent
Common Cause: A syntax error occurred in the wp-config.php file
Solution: Open the wp-config.php file in a text editor. The first line should contain only this line: <?php. The last line should contain only this line: ?>. Make sure that those lines contain nothing else-not even white space. Save the file changes.
Error#3:?Internal Server Error
Common Cause: Permissions on PHP files are set incorrectly.
Solution: Try setting the permissions (chmod) on the PHP files to 666. If that change doesn?t work, set them to 644. Each web server has different settings for how it lets PHP executes on it?s servers.
Error#4:?Page Not Found
Common Cause: The URL for the login page is incorrect.
Solution: Double-check that the URL you?re using to get to the login page is the same as the location of your WordPress installation (such as http://yourdomain.com/wp-logn.php).
Common cause: An index.html of index.htm file exists in the WordPress installation directory.
Solution: WordPress is a PHP application, so the default home page is index.php. Look in the WordPress installation folder on your web server. If there is an index.html or index.htm file in there, delete it.