Answer the question
In order to leave comments, you need to log in
How to create a post on a WordPress site using C#?
Good day. It is required using C # to write a program that can create posts on a site that is powered by WordPress. You can, of course, through the parsing of html pages, but I would like to hear something more adequate.
Answer the question
In order to leave comments, you need to log in
Well, through the MySql database, push the texts of the posts directly there
Here is the description of the database codex.wordpress.org/Database_Description
1. Download the connector for .net from the MySql website: dev.mysql.com/downloads/connector/net/5.2.html
2. Connect it , add a namespace:
3. Create a connection and open it:
var connection = new MySqlConnection(@"Database=your_db;Data Source=your_host;User Id=your_user;Password=your_password");
connection .Open();
var command = new MySqlCommand(@"INSERT bla-bla-bla",
connection);
command.ExecuteNonQuery();
connection.Close();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question