We consider a chemically inert elastically deformable rock for which only changes in stress and pore pressure are taken into account: the chemistry of a saturating pore fluid does not directly affect the rock deformation. Chemical effects are taken into account through transport equations, thus leading to changes in pore pressure and rock deformation. Hence, a change in the salinity of the saturating fluid of the porous medium has minimal effect on the rock stress. Due to the fact that clay particles in the shale are compacted fairly, the chemical composition of the pore fluid does change the stress in the shale and the effects characteristic of ions present the interest. The theory proposed is applied to mathematical modeling of the transfer of a solvent and solute through a semi-permeable clay shale. The constructed theory is used to simulate the swelling process around a wellbore. Expressions for stresses are obtained that allow one to explore the near-well space.