You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/index.md
+27-46
Original file line number
Diff line number
Diff line change
@@ -2,66 +2,60 @@
2
2
title: Overview
3
3
social:
4
4
cards_layout_options:
5
-
title: Documentation that simply works
5
+
title: WpDotNet - WordPress on .NET - Overview
6
6
---
7
7
8
8
# Overview
9
9
10
-
[WpDotNet](https://wpdotnet.peachpie.io/) is the unmodified WordPress, running compiled purely on .NET, provided as a NuGet package & ready to be used as a part of an ASP NET Core application. WpDotNet comes with additional components and features, making it easy to be used from C# and a .NET development environment in general.
10
+
[WpDotNet](https://www.wpdotnet.com/) is the unmodified WordPress, running compiled purely on .NET, provided as a NuGet package & ready to be used as a part of an ASP NET Core application. WpDotNet comes with additional components and features, making it easy to be used from C# and a .NET development environment in general.
11
11
12
12
The project does not require PHP to be installed, and is purely built on top of the .NET platform.
13
13
14
-
## Requirements
14
+
## Prerequisites
15
15
16
-
- .NET SDK 6.0, or newer. ([dotnet.microsoft.com](https://dotnet.microsoft.com/download) or [visualstudio.microsoft.com](https://visualstudio.microsoft.com/vs/))
16
+
- .NET SDK 6.0, or newer. ([dotnet.microsoft.com](https://dotnet.microsoft.com/download))
17
17
- MySQL Server ([dev.mysql.com](https://dev.mysql.com/downloads/mysql/) or [docker](https://hub.docker.com/_/mysql))
18
18
19
19
Make sure you have valid credentials to your MySQL server and you have created a database in it. The following quick start expects a database named `"wordpress"`. Database charset `"UTF-8"` is recommended.
20
20
21
21
## Quick Start
22
22
23
-
> The sources of a demo WordPress application are available at [github.com/iolevel/peachpie-wordpress](https://github.com/iolevel/peachpie-wordpress).
23
+
Open or create an ASP NET Core application, version 6.0 or newer.
24
24
25
-
Open or create an ASP NET Core application, version 3.0 or newer.
25
+
```shell
26
+
dotnet new web
27
+
```
26
28
27
29
Add a package reference to [`"Peachpied.WordPress.AspNetCore"`](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/) (note it is a **pre-release** package):
Add the WordPress middleware within your request pipeline, in the `Configure` startup method:
35
+
Add the WordPress services and set up your database connection (here or in `appsettings.json`):
34
36
35
37
```C#
36
-
publicpartialclassStartup
38
+
builder.Services.AddWordPress(options=>
37
39
{
38
-
publicvoidConfigure(IApplicationBuilderapp)
39
-
{
40
-
// ...
41
-
app.UseWordPress();
42
-
// ...
43
-
}
44
-
}
40
+
options.DbHost="localhost";
41
+
options.DbName="wordpress";
42
+
// ...
43
+
});
45
44
```
46
45
47
-
Add the WordPress option service within the `ConfigureServices` startup method and set up your database connection and other options:
46
+
> Note: the recommended approach is to place the configuration within the `appsettings.json` configuration file. See [configuration](configuration) for more details.
47
+
48
+
Add the WordPress middleware within your request pipeline:
> Note: the recommended approach is to place the configuration within the `appsettings.json` configuration file. See [configuration](configuration.md) for more details.
56
+
## Sample App
57
+
58
+
The sources of a demo WordPress application are available at [github.com/iolevel/peachpie-wordpress](https://github.com/iolevel/peachpie-wordpress).
The panel provides information about the current .NET runtime version, consumed memory, or total CPU time spent in the whole application. Note that the values are reset if the process is restarted.
73
67
74
-
## Registration
75
-
76
-
Go to the **At a Glance** panel in the WordPress Dashboard. The current registration information is displayed next the to **License:** label.
77
-
78
-
-**Register** opens a dialog to enter the e-mail you provided when purchasing your subscription, or the license key we issued if you have a custom build.
79
-
-**Purchase** opens the web page where you can buy your WpDotNet subscription.
80
-
81
-
The registration is bound to the host name of the domain you are running WpDotNet on.
82
-
83
-

84
-
85
-
You can use WpDotNet with all of its functionality without purchasing a subscription, but your pages will include a small watermark. To remove it, please register your WpDotNet subscription.
86
-
87
68
## Remarks
88
69
89
70
- Permalinks are implicitly enabled through the URL rewriting feature.
90
-
- WordPress debugging is implicitly enabled when running in a *Development* environment.
91
-
- When running on Azure with MySql in App enabled, the database connection is automatically configured.
92
-
- Response caching and response compression are enabled by default.
71
+
- WordPress debugging is implicitly enabled when running in a *Development* environment (debugging in your IDE).
72
+
- When running on Azure Web App with _MySql in App_ enabled, the database connection is automatically configured.
73
+
- Response caching and response compression are enabled by default when user is not logged in.
93
74
- Most of the original `.php` files are not present on the file system and cannot be edited.
0 commit comments