Skip to content

Commit

Permalink
overview page updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Sep 4, 2024
1 parent 47c1879 commit dc0c6fc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 51 deletions.
73 changes: 27 additions & 46 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,60 @@
title: Overview
social:
cards_layout_options:
title: Documentation that simply works
title: WpDotNet - WordPress on .NET - Overview
---

# Overview

[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.
[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.

The project does not require PHP to be installed, and is purely built on top of the .NET platform.

## Requirements
## Prerequisites

- .NET SDK 6.0, or newer. ([dotnet.microsoft.com](https://dotnet.microsoft.com/download) or [visualstudio.microsoft.com](https://visualstudio.microsoft.com/vs/))
- .NET SDK 6.0, or newer. ([dotnet.microsoft.com](https://dotnet.microsoft.com/download))
- MySQL Server ([dev.mysql.com](https://dev.mysql.com/downloads/mysql/) or [docker](https://hub.docker.com/_/mysql))

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.

## Quick Start

> The sources of a demo WordPress application are available at [github.com/iolevel/peachpie-wordpress](https://github.com/iolevel/peachpie-wordpress).
Open or create an ASP NET Core application, version 6.0 or newer.

Open or create an ASP NET Core application, version 3.0 or newer.
```shell
dotnet new web
```

Add a package reference to [`"Peachpied.WordPress.AspNetCore"`](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/) (note it is a **pre-release** package):

```shell
dotnet add package PeachPied.WordPress.AspNetCore --version 6.5.4-rc-020
```

Add the WordPress middleware within your request pipeline, in the `Configure` startup method:
Add the WordPress services and set up your database connection (here or in `appsettings.json`):

```C#
public partial class Startup
builder.Services.AddWordPress(options =>
{
public void Configure(IApplicationBuilder app)
{
// ...
app.UseWordPress();
// ...
}
}
options.DbHost = "localhost";
options.DbName = "wordpress";
// ...
});
```

Add the WordPress option service within the `ConfigureServices` startup method and set up your database connection and other options:
> Note: the recommended approach is to place the configuration within the `appsettings.json` configuration file. See [configuration](configuration) for more details.
Add the WordPress middleware within your request pipeline:

```C#
public partial class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddWordPress(options =>
{
options.DbHost = "localhost";
options.DbName = "wordpress";
// ...
});
}
}
// ...
app.UseWordPress();
// ...
```

> Note: the recommended approach is to place the configuration within the `appsettings.json` configuration file. See [configuration](configuration.md) for more details.
## Sample App

The sources of a demo WordPress application are available at [github.com/iolevel/peachpie-wordpress](https://github.com/iolevel/peachpie-wordpress).

## Dashboard

Expand All @@ -71,29 +65,16 @@ Besides regular WordPress dashboard pages, WpDotNet adds an informational panel

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.

## Registration

Go to the **At a Glance** panel in the WordPress Dashboard. The current registration information is displayed next the to **License:** label.

- **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.
- **Purchase** opens the web page where you can buy your WpDotNet subscription.

The registration is bound to the host name of the domain you are running WpDotNet on.

![watermark](img/watermark.png)

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.

## Remarks

- Permalinks are implicitly enabled through the URL rewriting feature.
- WordPress debugging is implicitly enabled when running in a *Development* environment.
- When running on Azure with MySql in App enabled, the database connection is automatically configured.
- Response caching and response compression are enabled by default.
- WordPress debugging is implicitly enabled when running in a *Development* environment (debugging in your IDE).
- When running on Azure Web App with _MySql in App_ enabled, the database connection is automatically configured.
- Response caching and response compression are enabled by default when user is not logged in.
- Most of the original `.php` files are not present on the file system and cannot be edited.

## Related links

- https://wpdotnet.peachpie.io/
- https://www.wpdotnet.com/
- https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/
[![NuGet](https://img.shields.io/nuget/v/PeachPied.WordPress.AspNetCore.svg)](https://www.nuget.org/packages/PeachPied.WordPress.AspNetCore/)
10 changes: 5 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ site_name: WpDotNet - WordPress on .NET
site_url: https://www.wpdotnet.com/
site_author: PeachPie Team
site_description: >-
This site provides WpDotNet project documentation and useful tips.
This site provides WpDotNet project documentation.
# Repository
repo_name: iolevel/wpdotnet
Expand All @@ -17,8 +17,8 @@ theme:
name: material
features:
- announce.dismiss
#- content.action.edit
#- content.action.view
- content.action.edit
- content.action.view
- content.code.annotate
- content.code.copy
- content.code.select
Expand Down Expand Up @@ -93,9 +93,9 @@ extra:
generator: false
social:
- icon: fontawesome/brands/github
link: https://github.com/peachpiecompiler
link: https://github.com/iolevel/wpdotnet-sdk
- icon: fontawesome/brands/x-twitter
link: https://x.com/pchpcompiler
link: https://x.com/pchpcompiler
- icon: fontawesome/brands/facebook
link: https://facebook.com/pchpcompiler
- icon: fontawesome/brands/youtube
Expand Down

0 comments on commit dc0c6fc

Please sign in to comment.