• Resolved colorproject

    (@colorproject)


    I have a React App that’s already built on a local machine. In my local machine, I don’t have WordPress installed. Is there a way to upload the app without setting the slug on the local machine first?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author rockiger

    (@rockiger)

    Assuming you are using create-react-app changing your package.json like this and rebuilding should work:

    "build": "PUBLIC_URL=/wp-content/reactpress/apps/[appname]/build react-scripts build",

    Thread Starter colorproject

    (@colorproject)

    Thank you rockiger! It’s a great plugin, I just got it to work! Very excited!

    Another question, during development I used a slug name. I deleted the app and rebuilt the app directory, but when I try to reuse the slug name, it says:

    “There exists another page that already has this page slug.”

    How can I refresh this so that the slug is available to use again?

    Plugin Author rockiger

    (@rockiger)

    ReactPress creates a page in your WP, you will need to delete this page to reuse the same slug.

    I am glad that ReactPress could help you. I am always happy about a nice review ??

    Thread Starter colorproject

    (@colorproject)

    Okay, so I deleted the page and I also deleted it from the trash – but I still can’t use the same slug name. Any other idea where I can check?

    Plugin Author rockiger

    (@rockiger)

    Maybe delete the app and try again. Otherwise, I don’t have any idea.

    Thread Starter colorproject

    (@colorproject)

    I can’t figure this out either. I deleted it and reinstalled it a few times. Removed the reactpress directory. I even searched for the slug name with phpmyadmin and no record of the slug name, and it still doesn’t let me reuse.

    Plugin Author rockiger

    (@rockiger)

    Did you delete the app only on the harddrive? If yes, the options array wasn’t changed properly.

    Uninstall ReactPress and install it again, then it should work like expected again. Careful, all settings for ReactPress will be deleted.

    I will need to add a feature for cleaning of the settings array in the future.

    Thread Starter colorproject

    (@colorproject)

    I was able to reuse the slug after a few uninstall/deactivation/deletes maybe it was a cache problem for me.

    I’m using a bitnami wordpress package. When I add this:
    “build”: “PUBLIC_URL=/wp-content/reactpress/apps/[appname]/build react-scripts build”,

    I can see it working on site.com/wp-content/reactpress/apps/appname/build but it doesn’t work on site.com/slug

    Any ideas what I missed?

    Plugin Author rockiger

    (@rockiger)

    Did you replace [appname] with the name of your app?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to deploy already built React App’ is closed to new replies.