Create .env.local
File
Copy code below, and Create .env file with nano /home/nextwp/.env.local
, then paste and adjust the code.
NODE_ENV=production
#your site name
SITE_NAME=Nextwp
SITE_LANG=en
CDN_DOMAIN=cdn.yourdomain.com
#cdn domain/subdomain
NEXT_PUBLIC_WORDPRESS_URL=https://yourdomain.com
#default runtime port
APP_URL=http://loaclhost:3000/
#1 (recomended) reject without https resource (must valid ssl), 0 allow both http and https resource,
NODE_TLS_REJECT_UNAUTHORIZED=1
#jwt auth refresh token
JWT_AUTH_REFRESH_TOKEN=eyJ0eXAiOiJKV1QiLCJ.eyJpc3MiOiJodHRwczovL3RlY2h0cmlidW5lLnRlc3QiLCJpYXQiOjE3MDY5MDkzNjIsIm5iZiI6MTcwNjkwOTM2MiwiZXhwIjoxNzM4NDQ1MzYyLCJkYXRhIjp7InVzZXIiOnsiaWQiOiIxIiwidXNlcl9zZWNyZXQiOiJncmFwaHFsX2p3dF82NTU0ZjJiOTFlM.r04VJmUaLZJNlUomXHeSmXLn3a-keziI60M1ul0hZao
#nextwp purchse code
NEXTWP_PURCHASE_CODE="12345-qwert-67890-asdfghjk"
#menu name for header
PRIMARY_MENU=HEADER_MENU
#menu name for footer
FOOTER_MENU=FOOTER_MENU
#google cse (custom search engine) ID
GOOGLE_CSE=64c3e7cb1844547b1
#Title for home lates post
LATE_POST_TITLE="Lates Posts"
#Description for home lates post
LATE_POST_DESC="Great News and Article for more knowledge"
#Google adsene pub id
PUBLIC_GOOGLE_ADS_CLIENT_ID=
#Ads unit id 1 for header
ADS_SLOT_1=
ADS_SLOT_2=
ADS_SLOT_3=
ADS_SLOT_4=
ADS_SLOT_5=
INLINE_ADS_EVERY=
Note
-
You can use different ad unit ids, or use the same ad unit id for each ADS_SLOT_1...5
-
INLINE_ADS_EVERY These are advertisements in posts, how often will your advertisement be displayed, for example
INLINE_ADS_EVERY=5
, then the advertisement will be displayed once every 5 paragraphs.
Get JWT_AUTH_REFRESH_TOKEN
JWT tokens are used to secure your WordPress site. The steps to make it are:
1
Access to graphql Ide2
Click add new mutation3
Check and fill in the fields:username, password and refreshToken
4
Switch execute as loged user5
Execute Query6
Copy refreshToken value and paste in env.local file forJWT_AUTH_REFRESH_TOKEN
value.
Get PRIMARY_MENU
and FOOTER_MENU
Check wp menu name
You need wp menu slug value for nextwp env, in above wp menu name is
Bottom Menu
, so the slug menu is bottom-menu
.
If you don't have a menu yet, we recommend creating a menu, both for the header and footer, And save the menu slug for nextwp env file.
You can also find out your menu slug via graphql ide: