Work machine to which a standard front attachment and a long front attachment are exchangeably mountable, the long front attachment being longer than the standard front attachment, the work machine having a hydraulic control apparatus comprising: a primary side coupler with which driving power is provided from a main body side of the work machine; and secondary side couplers (31, 32) to be coupled to the primary side coupler, the secondary side couplers (31, 32) being at the front attachment side of the standard front attachment and the long front attachment, respectively, wherein a hydraulic pressure circuit of the work machine includes: a control valve; and a switching valve configured to switch a variable relief valve (141, 142), the variable relief valve (141, 142) being configured to switch relief pressure of a driving actuator that drives the corresponding mounted front attachment; the switching valve being connected to an electric or hydraulic power supply when the primary side coupler is coupled to the secondary side coupler at the front attachment side of the standard front attachment, and being disconnected from the electric or hydraulic power supply when the primary coupler is coupled to the secondary side coupler at the front attachment side of the long front attachment, wherein this change in operational state of the switching valve is configured so as to switch the variable relief valve (141, 142) to a low pressure side and to limit an amount of movement of a spool in the control valve when the long front attachment is mounted to the main body side of the work machine. a primary side coupler with which driving power is provided from a main body side of the work machine; and secondary side couplers (31, 32) to be coupled to the primary side coupler, the secondary side couplers (31, 32) being at the front attachment side of the standard front attachment and the long front attachment, respectively, wherein a hydraulic pressure circuit of the work machine includes: a control valve; and a switching valve configured to switch a variable relief valve (141, 142), the variable relief valve (141, 142) being configured to switch relief pressure of a driving actuator that drives the corresponding mounted front attachment; the switching valve being connected to an electric or hydraulic power supply when the primary side coupler is coupled to the secondary side coupler at the front attachment side of the standard front attachment, and being disconnected from the electric or hydraulic power supply when the primary coupler is coupled to the secondary side coupler at the front attachment side of the long front attachment, wherein this change in operational state of the switching valve is configured so as to switch the variable relief valve (141, 142) to a low pressure side and to limit an amount of movement of a spool in the control valve when the long front attachment is mounted to the main body side of the work machine. a control valve; and a switching valve configured to switch a variable relief valve (141, 142), the variable relief valve (141, 142) being configured to switch relief pressure of a driving actuator that drives the corresponding mounted front attachment; the switching valve being connected to an electric or hydraulic power supply when the primary side coupler is coupled to the secondary side coupler at the front attachment side of the standard front attachment, and being disconnected from the electric or hydraulic power supply when the primary coupler is coupled to the secondary side coupler at the front attachment side of the long front attachment, wherein this change in operational state of the switching valve is configured so as to switch the variable relief valve (141, 142) to a low pressure side and to limit an amount of movement of a spool in the control valve when the long front attachment is mounted to the main body side of the work machine.