5

I was reading What is the difference between republish, smart publish and incremental publishes? and now I'm wondering if I'm better running a republish (as I always did) or a smart publish on a new Sitecore instance.

I had in mind that by running a republish I was skipping all the compares between master and web which are done by the smart publish option.

But now I realize that there are already a bunch of items on a brand new Sitecore instance which are already on both master and web, and it makes me think if a smart publish could be more efficient since it won't copy those items above mentioned.

Basically, what is the most efficient option on a new Sitecore instance?

2 Answers 2

5

The "Republish" required only when bringing a new web database online or creating a new publishing target etc. Copied the below highlighted paragraph from Sitecore document,

Republishing removes all obsolete versions from the target database. You can use republishing to bring a new web database online, to restore a backup of the master database, and to add a new content language, a new publishing target, or other system items to the website.

I guess in your case, you are not creating a new web database/publishing target, you are planning to use the web DB which comes with the Sitecore installation. So technically "Smart Publish" should be efficient.

I Just ran the Smart and Republish in two plain Sitecore 8.2 local instances separately, the time taken to complete the publish might vary due to various external parameters as well, so ignore the timing in the below logs. But the Republish is always overwriting/updating around 4625 items in a plain instance which might be an additional overhead, because those are already available in the web db.

**Sample Smart Publish logs from plain instance**
21148 14:18:00 INFO  Finished [Publishing] - ProcessQueue in 5773 ms
21148 14:18:00 INFO  Publish Mode : Smart
21148 14:18:00 INFO  Created : 0
21148 14:18:00 INFO  Updated : 0
21148 14:18:00 INFO  Deleted : 0
21148 14:18:00 INFO  Skipped : 4627

**Sample Republish logs from plain instance**
18628 14:25:59 INFO  Finished [Publishing] - ProcessQueue in 260689 ms
18628 14:25:59 INFO  Publish Mode : Full
18628 14:25:59 INFO  Created : 0
18628 14:25:59 INFO  Updated : 4625
18628 14:25:59 INFO  Deleted : 0
18628 14:25:59 INFO  Skipped : 2

Note - Whatever changes you make on top of the instance, only that needs to be migrated/published to the web db and "Smart Publish" can do that.

2

If you are creating a new Sitecore Instance, I would recommend to use a Full Site Publish as per Sitecore recommendation from the installation guide.

The reason why a Full Site Publish is recommended is because you'll make sure that the master and web databases are sync, i.e, items on master is present on web. I noticed that the Full Site Publish on a new Sitecore instance does not take long to run and also, I see that there are new items get created on the web database.

Moreover, if you have an extremely large number of changes (new instance or migrated/rewrote your entire site) the Smart Publish could also take a very long time since not only will it have to update almost all the items but it will also have to do the comparisons of each item.

Then, you can use incremental or smart publish afterwards. Normally, I tend to create an auto-publish agent which use the incremental publish. The job is ran every 1 hour to push changes live.

4
  • "because you'll make sure that the master and web databases are sync" so that means that the smart publish may result in a not synced state? Commented Apr 9, 2019 at 17:39
  • Smart Publish makes use of the revision field. So, if the revision id is same, it will skip the item. But republish will assure that all items are exactly the same on the target database (not taking into consideration workflow here). Commented Apr 9, 2019 at 17:45
  • But since we are talking about a brand new Sitecore instance, the revision ID should not cause any issue (famous last words)... Did you have experienced something different in real life? Commented Apr 9, 2019 at 17:46
  • As far as i know, it should not be a problem. I’ll try to test the performance of both in the coming days and I’ll update the answer. Truly speaking i think republish and smart publish on new instance may take approximately the same amount of time as the root item for smart publish will be the sitecore item. So it will compare each item while full publish will just push the item to web Commented Apr 9, 2019 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.