Data import & export, relations and component reordering, audit logs and more in Strapi v4.6
Tags: strapi, auditlogs, webdev, headlesscms
Published: 2023-01-26 08:22:57

It's with a lot of excitement that we announce Strapi v4.6, one of the biggest releases since v4. This release is packed with several new features, bug fixes and enhancements that improve both the developer and content experience. 

## Data Export & Import

Manage the data of your Strapi project with ease! With the new data export & import system, you can **backup & restore your Strapi project data without acting manually and directly into the database**.

![Screenshot 2023-01-23 at 15.49.28.png](https://d2zv2ciw0ln4h1.cloudfront.net/uploads/Screenshot_2023_01_23_at_15_49_28_b0e2424876.png)

Developers and DevOps specialists often need to backup or restore data for security or team collaboration purposes. Before, they had to operate directly on the database or through custom scripts and plugins. This required additional skills, time, and maintenance, making the process inefficient. 

The new data export & import system provides a new way to easily back your data up and restore it anytime. We implemented data encryption and compression by default to make this data export & import system more secure and portable than most solutions on the market today. 

Here's how it works: 

In your Strapi project folder, launch the command ``strapi export `` from the CLI. It will produce an archive containing all your application data. You can filter the exported data through the `` --only`` and`` --exclude`` options to include or exclude content, assets or config.

Once you have an exported archive, you can launch from the CLI the command ``strapi import <path_to_the_exported archive>`` that will perform a restore of all your data. Check out the [documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/data-management.html) for more details.

<iframe width="560" height="315" src="https://www.youtube.com/embed/oMS26wLsrqc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

A transfer command to directly migrate your data from your local instance of Strapi to a remote instance or vice versa is already in the works and should be available in the next release.

## Relations reordering
If you have ever felt the pain of managing an entry with a lot of relations, we’ve got good news for you! Now that relations are in the main layout with the rest of the fields and not on the side panel, they no longer have a negative impact on performance and can easily be reordered. 

In previous versions of Strapi, finding the necessary relation was time-consuming, especially if there were more than a dozen. Now, **you can drag & drop relations to change their order as you see fit.** We also updated the relations design: you can easily see what entry is in Draft or Published state, and distinguish relations from other fields.

![relations reordering](https://d2zv2ciw0ln4h1.cloudfront.net/uploads/relations_reordering_6f965df8f0.gif)

With these updates, your project performance won’t be impacted by the number of relation entries, and you’ll be able to quickly find the entry you need.

For instance, this new capability is especially useful if you want to change the order of products on an e-commerce site or put a specific article in the 1st place on your blog.

In case you can’t use a mouse, the drag&drops are keyboard accessible, so you can rearrange relations using a keyboard only.

It's also possible to reorder relations using REST API. Check out the [documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/relations.html) for more details.

![restapi_relations.png](https://d2zv2ciw0ln4h1.cloudfront.net/uploads/restapi_relations_6360b388bf.png)

## Component & dynamic zones reordering
Similar to relations, the process of reordering components and dynamic zones was  painful and time consuming - but not anymore. From now on, you can also easily reorder components and dynamic zones without clicking on the arrows multiple times. 

Just drag & drop components and dynamic zones to change your page layout in a couple of seconds. This functionality is keyboard accessible as well. 

![Components reorder GIF.gif](https://d2zv2ciw0ln4h1.cloudfront.net/uploads/Components_reorder_GIF_122f51e0f7.gif)

## Audit Logs (Enterprise Edition)
Many of you are using Strapi to manage sensitive or confidential content that require a higher level of security and compliance. So we’re excited to introduce a new audit log feature to **provide enterprises with a detailed audit trail of all activity **that happens within a given organization. Audit logs can be used to prevent unauthorized activity and provide insights during incident reviews. Ultimately, it reinforces data security and helps organizations comply with regulatory requirements related to data privacy.

Audit logs allow you to track, review and report the access or changes made in sensitive data. It allows you to identify problems quickly and reduces the risks of data leaks or breaches.

![audit logs.gif](https://d2zv2ciw0ln4h1.cloudfront.net/uploads/audit_logs_7171eba3b0.gif)

You can track changes to data (content type, entry, media), user activity (login, logout), and system configuration (user roles & permissions). You can also see when the action was made, what user did it (name & ID), and the payload attached to the log. All activity trails will be stored for 90 days by default. Check out the [documentation](https://docs.strapi.io/user-docs/latest/settings/audit-logs.html) for more details and watch this short video to learn how audit logs work:

<iframe width="560" height="315" src="https://www.youtube.com/embed/73a_434KbNM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

In the next releases, we’re planning to add a filter (by time range, user, action type) and search so that you can easily find the necessary log. We will also allow users to choose how long they want to store logs.

Audit logs are available in the Gold Enterprise Edition plan only, check out the [pricing page](https://strapi.io/pricing) to learn more.

## Media Library improvements: list view & configurations
Finding the right asset in the media library might be challenging, especially if you have a lot of files and folders. To simplify it, we added the possibility to view media in a list instead of a grid with a preview. This way, to easily scan and organize your assets as a clear and concise list.

![list view ml.gif](https://d2zv2ciw0ln4h1.cloudfront.net/uploads/list_view_ml_01234bbc8f.gif)

You can switch between list/grid mode in the new view configuration menu. It also allows you to choose the number of assets displayed by default and the sorting order. With this improvement, you can customize the media library as you see fit to optimize processes and editing experience. 

## New plugins on Strapi Market
Strapi marketplace now lists more than 100 plugins, providers and custom fields. We thank all community members for contributing their work, allowing other Strapi users to easily extend their app.

 Here are the new plugins, available on the Strapi Market: 

-   [Strapi Google Translator](https://market.strapi.io/plugins/strapi-google-translator) - translate your Strapi collections into 100+ languages using Google Cloud Translate.

-   [PayPal payments](https://market.strapi.io/plugins/strapi-paypal) - accept online payments and create subscriptions using Paypal.

-   [Instagram](https://market.strapi.io/plugins/@webvibe-io-strapi-plugin-instagram) - download image links from Instagram.

-   [Component Preview](https://market.strapi.io/plugins/strapi-plugin-component-preview) - get a preview of the components.

-   [Expo-notifications](https://market.strapi.io/plugins/@surunnuage-strapi-plugin-expo-notifications) - send notifications to your React-native apps via the Expo API directly from the Strapi admin panel.\
Get your plugin or provider listed on the [Strapi Market](https://strp.cc/3G1F33A) and showcase your work to more than 20,000 monthly visitors. Here are all the [resources](https://strp.cc/3Tlaetx) you need to create and promote a plugin or provider and the [submission form](https://strp.cc/3FXE8Ry) for listing it on the marketplace.

## Join the monthly Community Call
Meet the Strapi team members who worked on the latest features, share your feedback, ask questions, and learn what's coming next.  

**[Join us](https://www.youtube.com/watch?v=_98kqXJ4oqw&ab_channel=Strapi) on January 26th, 5PM CET / 8AM PDT.**

## Try Strapi v4.6 out now
To create a new Strapi v4.6 project, simply run the following command: 
```
npx create-strapi-app my-project --quickstart
```

Follow the [Quick Start Guide](https://strp.cc/3MR4nJ5) for detailed step-by-step instructions or have a look at a [video instruction](https://youtu.be/h9vETeRiulY).

We would love to hear what you think about the new features! Let us know in this forum thread. 


## Building Strapi together

Strapi is an open-source product that grows thanks to community support and contributions.

Here's how you can help us improve the product:

-   Contribute to the project on [Github](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md)

-   Share what features you'd love to have in our [public roadmap](https://strp.cc/3fQSZCK)

-   Create Strapi plugins and submit them to the [Strapi market](https://strp.cc/3G1F33A)

-   Showcase the projects you built in [Strapi Showcase](https://strp.cc/3hmKqjn) 

-   Join the [Strapi Cloud Beta program](https://strp.cc/3AnuoN1)

We appreciate each contribution and piece of feedback that you share. Stay tuned for more updates!