Tutorial
  • Home
  • News
  • Technology
    • All
    • Coding
    • Hosting

    Creating A Local Server From A Public Address

    Professional Gaming & Can Build A Career In It

    3 CSS Properties You Should Know

    The Psychology of Price in UX

    How to Design for 3D Printing

    5 Key to Expect Future Smartphones

    Is the Designer Facing Extinction?

    Everything To Know About OnePlus

    How to Unlock macOS Watch Series 4

  • Gadget

    5 Key to Expect Future Smartphones

    Everything To Know About OnePlus

    How to Unlock macOS Watch Series 4

    Surface Studio vs iMac – Which Should You Pick?

  • Design

    3 CSS Properties You Should Know

    The Psychology of Price in UX

    How to Design for 3D Printing

    Is the Designer Facing Extinction?

    Responsive Grid Layouts With Script

    How to Use ES6 Template Literals in JavaScript

    Getting Started with JavaScript Promises

    Introducing CSS’ New Font-Display Property

    3 Tips For Creating a Effective User Flow

No Result
View All Result
Tutorial
  • Home
  • News
  • Technology
    • All
    • Coding
    • Hosting

    Creating A Local Server From A Public Address

    Professional Gaming & Can Build A Career In It

    3 CSS Properties You Should Know

    The Psychology of Price in UX

    How to Design for 3D Printing

    5 Key to Expect Future Smartphones

    Is the Designer Facing Extinction?

    Everything To Know About OnePlus

    How to Unlock macOS Watch Series 4

  • Gadget

    5 Key to Expect Future Smartphones

    Everything To Know About OnePlus

    How to Unlock macOS Watch Series 4

    Surface Studio vs iMac – Which Should You Pick?

  • Design

    3 CSS Properties You Should Know

    The Psychology of Price in UX

    How to Design for 3D Printing

    Is the Designer Facing Extinction?

    Responsive Grid Layouts With Script

    How to Use ES6 Template Literals in JavaScript

    Getting Started with JavaScript Promises

    Introducing CSS’ New Font-Display Property

    3 Tips For Creating a Effective User Flow

No Result
View All Result
Tutorial
No Result
View All Result

WordPress on dot net core – Everything you need to know

admin by admin
in dotnet
6 min read
51 1
1
wordpress on asp.net core
52
SHARES
1.3k
VIEWS
Share on FacebookShare on Twitter

WordPress is a popular cms that tons of folks leverage for their businesses every day, but did you know that you could also run WordPress on.net core.

In this post, we’re going to see just exactly how we can do that. WordPress is a popular blogging system cms, and a lot of people run their businesses on WordPress. It powers around 30% of the websites. It has tens of thousands of plugins, and, contrary to what some people might say, it’s still by far the most popular and most widely used content management system on the internet. On the other hand, .net is very powerful in security, performance, and so on, but it lacks the content management system. So, isn’t it amazing to combine the best of both of those worlds? Hence, you get WordPress, which is fantastic in terms of all the plugins that you have. You can build a website from scratch in a short period and then combine it with all the advantages that .net offers: performance, security, a vast company backing its constant development, and continuous bug fixes.

Yes, WordPress on .net is possible with peachpie, that is a compiler built on top of the Roslyn platform, it’s a set of runtime and base class libraries and everything that allows compiling a PHP project, a group of PHP files into a regular .net project

How is it possible?

All the WordPress source files are compiled into a DLL file. Thanks to the peachpie project, we can use this compilation and integrate it into the asp.net core website running on the kestrel web server without any PHP or any unmanaged code. Everything is running purely on managed .net, taking advantage of the garbage collector and compiler. It is possible because everything in the ecosystem is rewritten from scratch in c sharp as a managed solution

How can I use the WordPress plugin?

You can use the WordPress plugin in different ways, and it has been well explained in their documentation. You can copy your existing plugins into a project, compile them as WordPress, so the first option is to compile them and create a .net project from them.

The second option is that peachpie has automatically compiled most of the plugins and themes into NuGet packages and already provided them on the NuGet feed to add a dependency in your project and use those plugins

Can I create a WordPress plugin in C#?

Yes, you can create plugins for WordPress in c-sharp or razor partial views and use it in your WordPress on .net installation.

Getting started with WordPress in .NET Core

You need to create an empty ASP.NET core project first.

You can use your existing asp.net core application as well.

The WordPress is already compiled and provided on the NuGet feed to add a dependency to the package, called PeachPied.WordPress.AspNetCore.

The next step is to add useWordPress in our request pipeline.

That’s it; now we have the WordPress in our asp.net core project.
We can also configure WordPress as our requirement. Here I have configured by DbPassword.

Now we need to set up a WordPress database. You can install MySQL on your system or use docker or any other services to create a single empty database.

Yes, you don’t need to install PHP or any web server for WordPress. Visual Studio or VS Code, dotnet SDK, NuGet package, and you are good to go.

Now we can run our WordPress application with default settings.

You can see the WordPress installation screen.

Great, so How can I upgrade my WordPress when a newer version comes?

Update the NuGet package. That’s it.

Peachpie has automated this process, so when the new WordPress comes out, it just fires action on their DevOps, creates a new package, runs the tests, and publishes the package so you will have the latest versions of WordPress as soon as it is available.

How can I use themes and plugins in WordPress that runs on .net Core?

First thing, the core WordPress is compiled, and you cannot modify it. The same applies to theme and plugins; they have to be compiled. PeachPie has modified the WordPress dashboard so that we can see the list of existing plugins, but they are not from wordpress.org, but they are compiled plugins.

The plugins you can see on your dashboard are NuGet packages. So it will download the NuGet package, extracts it, and in runtime, it loads the assembly into the memory, and you can activate it, which is similar to core WordPress.

Another way is to add peachpie feed in NuGet.

And then, you can install a plugin from the NuGet package manager.

OK, now tell me, Can I install my own custom Plugin in WordPress running on .net Core?

Well, yes, it is possible, but you need to compile it. You can create a new PeachPie Project, add your custom plugins as shown below, reference the project, and you are done.

You can see the plugins in your WordPress site now.

WordPress ecosystem has many great plugins, and we get .net performance, tooling of visual studio, and all the kinds of stuff that we are familiar with.

Reference:

https://github.com/peachpiecompiler

https://docs.peachpie.io/scenarios/wordpress/aspnetcore-wordpress/

Tags: dotnetdotnet corewordpress
Previous Post

Create Device Mockups in Browser with DeviceMock

Next Post

[Solved] AADSTS65001: The user or administrator has not consented to use the application with ID ‘x’ named ‘SharePoint Online Client Extensibility Web Application Principal’. Send an interactive authorization request for this user and resource.

admin

admin

Next Post
[Solved] AADSTS65001: The user or administrator has not consented to use the application with ID ‘x’ named ‘SharePoint Online Client Extensibility Web Application Principal’. Send an interactive authorization request for this user and resource.

[Solved] AADSTS65001: The user or administrator has not consented to use the application with ID 'x' named 'SharePoint Online Client Extensibility Web Application Principal'. Send an interactive authorization request for this user and resource.

Comments 1

  1. techyrajput says:
    6 months ago

    Awesome post.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You might also like

Azure cicd

How to setup Azure DevOps CI for ASP.NET Core? (updated 2021)

January 25, 2021
[Solved] AADSTS65001: The user or administrator has not consented to use the application with ID ‘x’ named ‘SharePoint Online Client Extensibility Web Application Principal’. Send an interactive authorization request for this user and resource.

[Solved] AADSTS65001: The user or administrator has not consented to use the application with ID ‘x’ named ‘SharePoint Online Client Extensibility Web Application Principal’. Send an interactive authorization request for this user and resource.

December 2, 2020
wordpress on asp.net core

WordPress on dot net core – Everything you need to know

September 2, 2020

Create Device Mockups in Browser with DeviceMock

August 31, 2020

Creating A Local Server From A Public Address

August 31, 2020

Professional Gaming & Can Build A Career In It

August 31, 2020
DOTNETBooK

Recipe for dotnet programmers.

Tags

Apple Artificial Intelligence Branding CSS dotnet dotnet core Gaming Javascript Laravel Photoshop PHP Server Smartphone Typography User Experience Web Design wordpress

Stay Connected

  • Home
  • News
  • Technology
  • Gadget
  • Design

© 2021 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • News
  • Technology
  • Gadget
  • Design

© 2021 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In