title: Magento2 How to update product information programmatically (PHP Script)?
body: <p>I tried to update all product information by product id but it's not working for me for all information. With below code "SKU" update successfully but unable to update other information like product name and other custom attribute value.</p>
  
  <p>How can I update all the information about the products using PHP script?</p>
  
  <pre><code>$productFactory = $objectManager-&gt;get('\Magento\Catalog\Model\ProductFactory');
  $product = $productFactory-&gt;create()-&gt;setStoreId($storeId)-&gt;load($product_id);
  $product-&gt;setStatus(1);
  $product-&gt;setName('test pr 123');
  $product-&gt;setSku('test sku');
  $product-&gt;setDescription("new product description.");
  $product-&gt;setShortDescription("new short description.");
  $product-&gt;save();
  </code></pre>